Conversation
Signed-off-by: nojebar <nicolas.ojeda.bar@lexifi.com>
f4b5978 to
e7e8c50
Compare
|
After further testing, it seems to be working: @Alizter, can you give it a try on your side to confirm? Thanks! |
otherlibs/dune-rpc/private/where.ml
Outdated
| | Error e -> Error e | ||
| | Ok contents -> | ||
| (match of_string contents with | ||
| (match default ~build_dir () with |
There was a problem hiding this comment.
I don't know what the issue is yet, but this fix doesn't seem right to me. Previously, the code would look at the socket inside the build directory to connect, and now it's just assuming the address is the default address.
There was a problem hiding this comment.
Nothing has changed here for Unix systems: default ~build_dir () still returns the socket inside the build directory:
dune/otherlibs/dune-rpc/private/where.ml
Lines 130 to 134 in 071cb47
There was a problem hiding this comment.
Okay, but even on Windows, the workflow to connect should be:
- Inspect the file _build/.rpc/dune
- If it's a socket, connect to it (will never happen on windows)
- If it's a normal file, read it and get the connection string from here. On windows, that connection string will have the address we want to connect on.
There was a problem hiding this comment.
Oops, you are right. I hadn't grasped the logic behind the client/server split. Now I pushed a commit with the right fix I think.
| | `Unix p -> sprintf "unix://%s" p | ||
| | `Ip (`Host host, `Port port) -> sprintf "%s:%d" host port | ||
| ;; | ||
| let to_string t = Dune_rpc_private.Where.to_string t |
There was a problem hiding this comment.
Use the right "dbus" format so that it can be parsed back in
dune/otherlibs/dune-rpc/private/where.ml
Lines 154 to 162 in 071cb47
Signed-off-by: nojebar <nicolas.ojeda.bar@lexifi.com>
doc/changes/8806.md
Outdated
| @@ -0,0 +1 @@ | |||
| - Fix `dune rpc status` on Windows (#8806, fixes #8799, @nojb) | |||
There was a problem hiding this comment.
This fixes a little more than status. It should fix all dune rpc commands in fact.
There was a problem hiding this comment.
Thanks for the review. I amended the Changes entry.
Sure. To be clear, this is a regression introduced in 3.9.0? |
I suspect this has never worked on Windows, until this PR. |
|
OK. Note a huge rush then. I'll backport that to 3.11.1. |
Signed-off-by: nojebar <nicolas.ojeda.bar@lexifi.com>
Signed-off-by: nojebar <nicolas.ojeda.bar@lexifi.com> Signed-off-by: Etienne Millon <me@emillon.org>
CHANGES: - Fix `dune rpc` commands on Windows (ocaml/dune#8806, fixes ocaml/dune#8799, @nojb) - Fix `inline_tests` when the partition list is empty (ocaml/dune#8849, fixes ocaml/dune#8848, @hhugo)
CHANGES: - Fix `dune rpc` commands on Windows (ocaml/dune#8806, fixes ocaml/dune#8799, @nojb) - Fix `inline_tests` when the partition list is empty (ocaml/dune#8849, fixes ocaml/dune#8848, @hhugo)

Beginning of a fix for #8799, but not complete because
dune rpc statusdoes not seem to be fully working:(no data is reported for the connected client)
cc @Alizter