ocurrent / solver-service

An OCluster service for solving opam dependencies
Apache License 2.0
11 stars 7 forks source link

Replace usage of `socketpair` for IPC #23

Closed MisterDA closed 1 year ago

MisterDA commented 1 year ago

On Windows, using a socket as standard input file descriptor is daring. Even if it may be possible, Lwt will currently outright reject it. We can, instead of passing a file descriptor to the spawned process, pass the address of the UNIX domain socket as an argument so that the sub process may open a socket itself and connect to that address.

UNIX domain sockets are supported on Windows 10 and OCaml 4.14.

MisterDA commented 1 year ago

The CI failure will be fixed by #24 .

MisterDA commented 1 year ago

LGTM. Just a question why not having ocaml >= 4.14.0 for solver-service-api too ?

Well strictly speaking it's the other packages that require 4.14 for Unix domain sockets on Windows, but yeah I can add it everywhere.

tmcgilchrist commented 1 year ago

Having an ocaml 4.14 constraint should fix the CI issue. Both places we want to use this will also be OCaml 4.14 or newer.