-
Notifications
You must be signed in to change notification settings - Fork 462
Open
Labels
Description
After #12473, running dune build --watch and dune exec in parallel works great. That's fantastic, thanks a lot. However, I observe an issue when DUNE_BUILD_DIR is also set.
Expected Behavior
The binary under $DUNE_BUILD_DIR is rebuilt if needed, and executed.
Actual Behavior
Error message about not being able to build the binary
Error: Don't know how to build
Reproduction
- PR with a reproducing test:
- Repro code
dune:
(executable
(name test_watch))
dune-project:
(lang dune 2.8)
test_watch.ml:
let () = print_endline "Hello, World!"
dune build -w &
Success, waiting for filesystem changes...
dune exec ./test_watch.exe
Hello, World!
Works! (make sure to kill the watcher)
export DUNE_BUILD_DIR=$HOME/tmp/dune
mkdir -p $DUNE_BUILD_DIR
dune build -w &
Success, waiting for filesystem changes...
dune exec ./test_watch.exe
Error: Don't know how to build /home/byakobow/tmp/dune/default/test_watch.exe
Had 1 error, waiting for filesystem changes...Warning:
Your build request is being forwarded to a running Dune instance (pid:
4113118). Note that certain command line arguments may be ignored.
Error: Don't know how to build /home/byakobow/tmp/dune/default/test_watch.exe
Error: Build failed with 1 error.
Had 1 error, waiting for filesystem changes...
Specifications
- Version of
dune(output ofdune --version):3.20.2-1064-ge29a36c(trunk as of right now) - Version of
ocaml(output ofocamlc --version): 4.14.2 - Operating system (distribution and version): Debian oldstable
Reactions are currently unavailable