-
Notifications
You must be signed in to change notification settings - Fork 449
Open
Description
Expected Behavior
For long-running processes like webservers, I'm normally starting dune exec --watch binary_name
. Whenever I change a source code file, dune kills the running process, recompiles it and starts it again. This works with dune 3.19.1
.
Actual Behavior
Since upgrading to dune 3.20.1
, when changing the source code, the long-running process is not killed anymore. Recompilation only starts when the process exits on its own or I kill it manually.
Reproduction
-
create a dune project with the following code in
bin/main.ml
:let () = for i = 20 downto 0 do Unix.sleep 1; print_endline (string_of_int i); done
and the following
bin/dune
:(executable (public_name countdown) (name main) (libraries unix))
-
start
dune exec --watch countdown
-
change
bin/main.ml
The countdown continues until it reaches 0. Then recompilation starts and the process is started again.
Specifications
- Version of
dune
(output ofdune --version
): 3.20.1 - Version of
ocaml
(output ofocamlc --version
): 5.3.0 - Operating system (distribution and version): NixOS 25.05