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.
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?
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