Open abhillman opened 1 year ago
Related discussion https://alan.petitepomme.net/cwn/2022.08.30.html
Screenshot of the man page for dune-utop
that mentions --watch
:
One workaround I just discovered, which I haven't quite seen documented before:
$ utop
# use_output "dune top";;
Then in a separate window, edit a file and then run dune build
; then go back to utop
and write # use_output "dune top";;
again.
Seems to me could be bundled into a little method that could be stored in a config file or something like that.
@rgrinberg @emillon We don't support the watch flag for dune ocaml utop
is that correct?
Not yet. It would require a little more design to spec how this would work.
Expected Behavior
If a file that has been loaded by utop has been changed (e.g. a local library), the source will be re-built and the latest version (if compilation is successful) will be available to
utop
.Actual Behavior
--watch
appears to do nothingReproduction
Simply run
dune init project newproj
and create a library with some function. From there, rundune utop
and note that the function works; then modify the source for the function, and note that the old version is used byutop
. By contrast, note thatdune build --watch
appears to work.Specifications
dune
(output ofdune --version
):ocaml
(output ofocamlc --version
)