dialohq / ocaml-grpc

gRPC library for OCaml
https://dialohq.github.io/ocaml-grpc
BSD 3-Clause "New" or "Revised" License
62 stars 9 forks source link

routeguide examples do not compile #59

Closed aryx closed 6 months ago

aryx commented 6 months ago

following the routeguide tutorial I did:

$ git clone https://github.com/dialohq/ocaml-grpc
$ cd ocaml-grpc
$ dune exec -- routeguide-server ./examples/routeguide/data/route_guide_db.json

But then get this error:

File "examples/routeguide/src/server.ml", line 133, characters 26-42:
133 | let record_route (clock : _ Eio.Time.clock) (stream : string Seq.t) =
                                ^^^^^^^^^^^^^^^^
Error: The type constructor Eio.Time.clock expects 0 argument(s),
       but is here applied to 1 argument(s)

and with the client:

dune exec -- routeguide-client
File "examples/routeguide/src/client.ml", line 18, characters 60-66:
18 |   H2_eio.Client.create_connection ~sw ~error_handler:ignore socket
                                                                 ^^^^^^
Error: This expression has type Eio.Net.stream_socket
       but an expression was expected of type Eio.Flow.two_way
       The second object type has no method close
aryx commented 6 months ago

Here is my configuration:

opam list | grep grpc
grpc                       0.2.0            A modular gRPC library
grpc-eio                   0.2.0            An Eio implementation of gRPC
[pad@thinkstation ocaml-grpc (main)]$ opam list | grep eio
eio                        0.11             Effect-based direct-style IO API for OCaml
eio_linux                  0.11             Eio implementation for Linux using io-uring
eio_main                   0.11             Effect-based direct-style IO mainloop for OCaml
eio_posix                  0.11             Eio implementation for POSIX systems
gluten-eio                 0.4.1            EIO runtime for gluten
grpc-eio                   0.2.0            An Eio implementation of gRPC
h2-eio                     0.10.0           EIO support for h2
aryx commented 6 months ago

Closing, switching to eio 1.0 solved the issue!