RPC advertised but non-working...
having installed v3.4.1 to get over a bug I looked in again at dune-rpc. with a section on it in the manual one could be forgiven for thinking this feature is moving along since its inception at v3.0.0. the reality however is:
dune rpc init
dune rpc: unknown command `init'.
Usage: dune rpc [OPTION]...
Try `dune rpc --help' or `dune --help' for more information.
and 'help' yields nothing. why is there a manual mention of this at all at this stage? perhaps this is a bug but in looking through the .mli I still see nothing about what information can actually be extracted from dune. in fairness it does say it is about the general protocol but then where are the specifics?
the manual does ask for feedback regarding future development though so here's my 2 cents. I would like to get notification when a module is successfully compiled, indeed each module, and when the overall re-compilation (dune-watch) has succeeded or failed.
thanks.
Hi,
The docs mentions dune rpc init but indeed that's not a thing.
You can use the RPC like the following for example:
- start a RPC server using
dune build --passive-watch-mode - on another terminal, run
dune rpc build .- this will run a build and display the status there.
Indeed this is an issue with the docs. dune rpc init was an early experiment that never made it to production.
that's great news. about the specifics of info one can get from the rpc server - is it correct to say the mli file the docs point to do not go into specifics, and if so can you point me somewhere for those?
thanks again.
This is the best reference we currently have: https://github.com/ocaml/dune/blob/main/otherlibs/dune-rpc/dune_rpc.mli
Note that to turn on the rpc server, you simply need to run dune in watch mode.