Hi to all,

I've been using fsmonitor in a small project from a while. Today I tryed to build the file using it in another machine, but failed because nimble can't find fsmonitor package. I know about the warning in module's doc:

Warning: This module will likely disappear soon and be moved into a new Nimble package.

I don't really understand why devs decided for this. For me it would be okay, if I could find the Nimble package. Some of you knows where I can find sources and or package?

Thanks in advance.

2017-09-09 23:54:29
fsmonitor is still in lib/packages so add that to your --path, this is not machine specific (but maybe your config is). fsmonitor is Linux specific and that's why it shouldn't be in the standard library.
2017-09-11 06:42:15

I wish we could go down the other route and make fsmonitor cross-platform by abstracting away the inotify stuff. The reason why having it in the standard library could be beneficial: One of the things I'm missing the most compared to Scala development is SBT's ~compile/~run/~test functionality, which allows to easily set-up source code watchers and re-run the compiler (and optionally arbitrary entry points or tests) whenever the source code changes.

If the functionality gets pushed into third party libraries it will be even more difficult to integrate such functionality by default into Nim's build approaches. I currently always fall back to hacky/non-cross-platform bash+inotify or even nodejs based watchers, and it would be much nicer if source code watching could become standard nimscript functionality. I have it on my todo list to look into that, but I'm not sure when I can get to work on it. Wasn't there a thread asking for some beginner challenges, maybe that would work?

2017-09-11 16:39:35

There's native fs monitor in Windows using win32 API. This is example of using it https://msdn.microsoft.com/en-us/library/windows/desktop/aa365261(v=vs.85).aspx

This is exactly coded from that example https://gist.github.com/mashingan/4a31d3a630e22cf9274eebf475ee60e6

2017-09-12 03:56:28
I'm using fsmonitor in https://github.com/FedericoCeratto/nim-testrunner/ and I'll be happy to support other OSes if fsmonitor did so.
2017-09-12 13:02:42