Format ocaml blocks with ocamlformat-rpc#316
Format ocaml blocks with ocamlformat-rpc#316gpetiot wants to merge 5 commits intorealworldocaml:mainfrom gpetiot:ocamlformat-rpc
Conversation
|
I've added an option @emillon @NathanReb @jsomers @pitag-ha I was having a look at how we can pass an instance of a running ocamlformat-rpc server to mdx (instead of spawning the process in mdx like it's currently the case) but didn't find any solution. At first I thought the pid of the process would be enough but there is no way to get the right channels from the pid. What would be the right way to do it? I had a look at the dune rpc feature but it wasn't very helpful either |
|
Ready to be reviewed! |
Could you use a unix domain socket with a know name? e.g. |
That does sound like a good idea! |
|
cc @emillon to get some insight on the dune side, I'm afraid ocamlformat-rpc needs another release to support sockets (or maybe just having a in_channel/out_channel is enough to support sockets) |
|
Replaced by #335 |
Using ocaml-ppx/ocamlformat#1692