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

Error locations incorrect when a deriver is missing #78

Open
hcarty opened this issue May 22, 2018 · 0 comments
Open

Error locations incorrect when a deriver is missing #78

hcarty opened this issue May 22, 2018 · 0 comments

Comments

@hcarty
Copy link
Contributor

hcarty commented May 22, 2018

Compiling the following reports an error with no location. It should probably be on the j in y: j. This is using the version 3.1 or the latest master branch of ppx_deriving_yojson and ppx_deriving 4.2.1.

test.ml

(* Just a comment *)

type j

type t = {x: int; y: j} [@@deriving yojson]

jbuild

(jbuild_version 1)

(executable
  ((name test)
   (preprocess (pps (ppx_deriving_yojson)))
   (libraries (ppx_deriving_yojson.runtime))))

Build error with:

$ jbuilder build test.exe
      ocamlc .test.eobjs/test.{cmi,cmo,cmt} (exit 2)
(cd _build/default && /home/hcarty/.opam/4.06.0/bin/ocamlc.opt -w -40 -g -bin-annot -I .test.eobjs -I /home/hcarty/.opam/4.06.0/lib/biniou -I /home/hcarty/.opam/4.06.0/lib/easy-format -I /home/hcarty/.opam/4.06.0/lib/ppx_deriving -I /home/hcarty/.opam/4.06.0/lib/ppx_deriving_yojson/runtime -I /home/hcarty/.opam/4.06.0/lib/result -I /home/hcarty/.opam/4.06.0/lib/yojson -no-alias-deps -o .test.eobjs/test.cmo -c -impl test.pp.ml)
File "_none_", line 1:
Error: Unbound value j_to_yojson
Hint: Did you mean to_yojson?
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

1 participant