ocurrent / solver-service

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

README example fails #66

Closed talex5 closed 1 year ago

talex5 commented 1 year ago

The example at the start of the README fails:

$ dune exec -- ./examples/main.exe --package=yaml --version=3.0.0 capnp://...
main.exe: [INFO] Connecting to tcp:127.0.0.1:7000...
main.exe: [INFO] Generating new private key...
main.exe: [INFO] Generated key with hash sha-256@ILYjkOefHoCXjRuGt6smyJ8LaGgR_iseUXnHKXziULA
main.exe: [INFO] Connecting to 127.0.0.1:7000...
main.exe: [INFO] Doing TLS client-side handshake...
main.exe: [INFO] Connected to tcp:127.0.0.1:7000
solve-local: internal error, uncaught exception:
             Failure("hd")

It looks like there are several bugs here:

  1. The example client uses List.hd to get the result for the single requested platform. But if there is no solution then the list will be empty.
  2. The default compiler version for the example solve is 4.14.0, but the default opam-repository hash is too old to contain that version.
  3. The log from the solver isn't shown until the end, and then only if the solver itself fails. So in this case, there's just a long delay where it doesn't seem to be doing anything, then a crash.

It's also odd that the command is called solve-local, even though it's doing a remote solve.