v watch run main.v does not work as expected #6
Starting v watch run main.v should compile main.v and start the binary. Once main.v get changed, v should recompile and restart main.v.
However v does not recompile and does not restart. Once main.v is changed and saved, the command v watch run main.v continues to run, but will do nothing until interrupted by ctrl c.
$ v watch run main.v
2026-06-15 09:28:14.137: "/home/user/v" run main.v | pid: 90074 | reload cycle: 0
1
2
[1, 2]
^C
$
main.v was edited, changed and saved with vim, nano and gedit.
Expected behavior:
V should recompile and restart on every change - as v help watch is describing:
"v watch collects all .v files needed for a compilation, then when
any of the .v source files change, it re-runs the compilation."
Additional information:
Alternative commands like v watch -a main.v run main.v or using the WATCH_TIMEOUT environment variable do show the wrong behavior as described above.
[!NOTE] You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.