When developing web services, it is often useful to rebuild and restart the executable on any file changes. Thus, it would be useful to be able to run dune exec foo --watch and have the program restarted on changes.
While --watch is a valid argument to dune exec (since is a common flag), afaict it is not implemented for dune exec. It seems to only be implemented for commands that go through Main.run_build_command, whereas Exec.command invokes the scheduler with Import.do_build directly, bypassing the handling for watch.
Any thoughts on how desirable this would be and how difficult it would be to implement?
When developing web services, it is often useful to rebuild and restart the executable on any file changes. Thus, it would be useful to be able to run
dune exec foo --watchand have the program restarted on changes.While
--watchis a valid argument todune exec(since is acommonflag), afaict it is not implemented fordune exec. It seems to only be implemented for commands that go throughMain.run_build_command, whereasExec.commandinvokes the scheduler withImport.do_builddirectly, bypassing the handling forwatch.Any thoughts on how desirable this would be and how difficult it would be to implement?