andreas / ocaml-graphql-server

GraphQL servers in OCaml
MIT License
624 stars 60 forks source link

Fix Yojson compilation warnings #145

Closed mpcjanssen closed 5 years ago

anmonteiro commented 5 years ago

This is an unfortunate change in Yojson because it’s not backwards compatible. I think until the json type really goes away we should support older versions of yojson.

For example, I think there isn’t yet a pox_deriving_yojson release that supports the new Yojson types.

mpcjanssen commented 5 years ago

In that case it would make sense to allow warnings. As it it, building the example fails with deprecation errors.

Adding the following snippet to the dune file at least makes dune exec examples/server.exe work:

 (env
    (dev
      (flags (:standard -warn-error -A))))
anmonteiro commented 5 years ago

@mpcjanssen the point of the dev profile is to have warnings enabled. You can add --profile=release when building, or simply disable warning 3 (flags (:standard -w -3))

mpcjanssen commented 5 years ago

Still, the current example instructions leads to a failing build. Any fix would be ok.

anmonteiro commented 5 years ago

Disabling warning 3 for the examples sounds sensible to me.

mpcjanssen commented 5 years ago

Disabling the specific warnings makes more sense than this PR.