Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an expression was expected of type Shared.Types.todo list GQL.Schema.io = Shared.Types.todo list Lwt.t #2

Closed
dvisztempacct opened this issue Jun 9, 2018 · 2 comments

Comments

@dvisztempacct
Copy link
Contributor

Using opam 2.0.0~rc2 and ocamlc 4.06.1 trying to build reason-graphql-fullstack 85dd67be8f3f4ea663f0834e5ff280a24cea618b I had to manually install an extra package cohttp-lwt-unix 1.0.2 to get it to run ocamlc

donviszneki@Dons-MacBook-Pro ~/foobar$ jbuilder build @graphql && jbuilder exec graphql
File "/Users/donviszneki/.opam/default/lib/cohttp/META", line 1, characters 0-0:
Error: Library "cohttp-lwt-unix" not found.
-> required by library "cohttp.lwt" in /Users/donviszneki/.opam/default/lib/cohttp

Once that was solved, ocamlc gave me the following error:

donviszneki@Dons-MacBook-Pro ~/foobar$ jbuilder build @graphql && jbuilder exec graphql
      ocamlc src/server/.main.eobjs/schema.{cmi,cmo,cmt} (exit 2)
(cd _build/default && /usr/local/bin/ocamlc.opt -w -40 -g -bin-annot -I src/server/.main.eobjs -I /Users/donviszneki/.opam/default/lib/angstrom -I /Users/donviszneki/.opam/default/lib/astring -I /Users/donviszneki/.opam/default/lib/base -I /Users/donviszneki/.opam/default/lib/base/caml -I /Users/donviszneki/.opam/default/lib/base/shadow_stdlib -I /Users/donviszneki/.opam/default/lib/base64 -I /Users/donviszneki/.opam/default/lib/biniou -I /Users/donviszneki/.opam/default/lib/bytes -I /Users/donviszneki/.opam/default/lib/cohttp -I /Users/donviszneki/.opam/default/lib/cohttp-lwt -I /Users/donviszneki/.opam/default/lib/cohttp-lwt-unix -I /Users/donviszneki/.opam/default/lib/conduit -I /Users/donviszneki/.opam/default/lib/conduit-lwt -I /Users/donviszneki/.opam/default/lib/conduit-lwt-unix -I /Users/donviszneki/.opam/default/lib/easy-format -I /Users/donviszneki/.opam/default/lib/fieldslib -I /Users/donviszneki/.opam/default/lib/fmt -I /Users/donviszneki/.opam/default/lib/graphql -I /Users/donviszneki/.opam/default/lib/graphql-lwt -I /Users/donviszneki/.opam/default/lib/graphql_parser -I /Users/donviszneki/.opam/default/lib/ipaddr -I /Users/donviszneki/.opam/default/lib/ipaddr/unix -I /Users/donviszneki/.opam/default/lib/logs -I /Users/donviszneki/.opam/default/lib/lwt -I /Users/donviszneki/.opam/default/lib/magic-mime -I /Users/donviszneki/.opam/default/lib/parsexp -I /Users/donviszneki/.opam/default/lib/ppx_sexp_conv/runtime-lib -I /Users/donviszneki/.opam/default/lib/re -I /Users/donviszneki/.opam/default/lib/re/emacs -I /Users/donviszneki/.opam/default/lib/re/posix -I /Users/donviszneki/.opam/default/lib/result -I /Users/donviszneki/.opam/default/lib/rresult -I /Users/donviszneki/.opam/default/lib/sexplib -I /Users/donviszneki/.opam/default/lib/sexplib0 -I /Users/donviszneki/.opam/default/lib/stringext -I /Users/donviszneki/.opam/default/lib/uchar -I /Users/donviszneki/.opam/default/lib/uri -I /Users/donviszneki/.opam/default/lib/uri/services -I /Users/donviszneki/.opam/default/lib/yojson -I /usr/local/lib/ocaml/threads -I src/shared/.shared.objs -no-alias-deps -o src/server/.main.eobjs/schema.cmo -c -impl src/server/schema.re.ml)
File "src/server/schema.re", line 63, characters 12-59:
Error: This expression has type
         (Shared.Types.todo list, 'a) Lwt_result.t =
           (Shared.Types.todo list, 'a) Result.result Lwt.t
       but an expression was expected of type
         Shared.Types.todo list GQL.Schema.io = Shared.Types.todo list Lwt.t
       Type
         (Shared.Types.todo list, 'a) Result.result =
           (Shared.Types.todo list, 'a) Pervasives.result
       is not compatible with type Shared.Types.todo list
      ocamlc src/server/.main.eobjs/server.{cmi,cmo,cmt}
File "src/server/server.re", line 48, characters 6-40:
Warning 10: this expression should have type unit.
File "src/server/server.re", line 56, characters 6-41:
Warning 10: this expression should have type unit.
File "src/server/server.re", line 80, characters 2-42:
Warning 10: this expression should have type unit.
    ocamlopt src/server/.main.eobjs/server.{cmx,o}
File "src/server/server.re", line 48, characters 6-40:
Warning 10: this expression should have type unit.
File "src/server/server.re", line 56, characters 6-41:
Warning 10: this expression should have type unit.
File "src/server/server.re", line 80, characters 2-42:
Warning 10: this expression should have type unit.
@anmonteiro
Copy link
Owner

@dvisztempacct I forgot you need a local pin of ocaml-graphql-server. There hasn't been a release in a while and I wanted to use a new feature!

@anmonteiro
Copy link
Owner

fixed by #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants