Proposal: watch mode
A very common workflow in modern software development is to use a "watch-mode" to trigger automatic rebuild/test/compile/run every time a watched file is changed.
There are some considerations:
- should the watch-mode work with projects only. This way it is possible to look up for new and deleted files.
- should it work for compile-* commands also? This would be more primitive only looking for specified files in the command.
To be cross-platform, this requires interaction with the file-systems-metadata on every platform. The hard part is to test this, as it might need manual testing on different architectures.
GHA supports some major platforms, I also found this Github Action for BSD that utilies qemu: https://github.com/cross-platform-actions/action
Another solution is to use a third-party library as a temporary solution, e.g. https://github.com/SpartanJ/efsw
I think the watch flag would be an overkill for a statically typed programming language, because it has to go through multiple phases during compilation and run procedure.
Personally I have mapped a hotkey in Vim editor to run c3c run -q which compiles and runs almost instantly, which is not exactly what you are looking for, but it works just as fine as a watch flag.
After thinking about this a bit: yes, it should be added. I am not sure about the timeframe though, so I've tentatively put it for 0.8.0, but if someone tackles it early or I have a lot of time on my hands it will happen early.