如何使用“ dune utop --watch”?

时间:2019-05-24 22:05:58

标签: ocaml-dune

我希望dune utop或另一个OCaml顶层在运行时对代码进行更改。似乎dune utop --watch是设计用来这样做的。真的吗?我如何利用它?

在实验dune utop --watch中,我忽略了保存到模块源代码中的更改。执行dune build命令的变体似乎也无济于事。

尽管显然与dune不兼容,但我也尝试了#use#mod_use指令,但没有运气:utop似乎直到重新启动才开始接受我的代码更改。

1 个答案:

答案 0 :(得分:0)

嗯..(一旦您安装了inotifywait)  dune build --watch确实开始工作,但是dune utop --watch仍然无法提取保存到源文件的更改。

--watch选项在dune utop --watch中被认为是有效的,并且dune utop --help确实将其宣传为受支持,但这似乎只是dunedune utop --watch中的一个错误。实际上与dune utop的行为完全相同。

这将是一个非常不错的选择,但显然它不受支持,可能无法支持...

相关问题