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

Conflict with ppx_deriving arguments (non-optional labeled argument expected) #9

Closed
copy opened this issue May 25, 2017 · 6 comments
Closed

Comments

@copy
Copy link

copy commented May 25, 2017

Compiling the code below yields:

% ocamlbuild -use-ocamlfind -pkg ppx_deriving.show -package ppx_deriving -pkg ppx_sexp_conv test.byte
+ ocamlfind ocamldep -package ppx_sexp_conv -package ppx_deriving -package ppx_deriving.show -modules test.ml > test.ml.depends
File "test.ml", line 1, characters 25-51:
Error: non-optional labeled argument expected
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
type t = int [@@deriving show { with_path = false }]

Reporting here since the error is from this repository. This is with ppx_deriving 4.1+dev, ppx_type_conv v0.9.0 and ppx_sexp_conv v0.9.0.

@ghost
Copy link

ghost commented May 26, 2017

This is only supported with the development version of ppx_type_conv. Ppx_deriving 4.1+dev is a branch i made. I'll backport support for this in ppx_type_conv v0.9 if the ppx_deriving changes are merged upstream.

@camlspotter
Copy link

camlspotter commented Sep 26, 2017

I was also hit by this option handling difference recently when I use ppx_deriving and ppx_typerep_conv at the same time. Any news?

@choeger
Copy link

choeger commented Oct 5, 2017

Me too, this prevents me from using visitors, since it expects a mandatory argument. Are there any informations on this?

It might be a little late to mention it, but why in hell do janestreet derivers and ppx_deriving use the same namespace? This seems to cause lots of trouble for pretty much no benefits.

@choeger
Copy link

choeger commented Oct 5, 2017

Update: I tried the latest development version of ppx_type_conv via opam pin. The error is gone, but the deriver is apparently never invoked. It looks like there are some incompatibilities that are not caught by the typechecker.

@diml could you give me any hints on how to trace the problem and test a newer version?

@ghost
Copy link

ghost commented Nov 29, 2017

This stuff is a bit complicated indeed, this is mostly for historical reason. I did some work to clean up things a bit earlier this year, the last part of the work is doing a minor release of ppx_core and ppx_type_conv. I think after that everything should work smoothly. I'll prepare this

@ghost ghost self-assigned this Nov 29, 2017
@ghost
Copy link

ghost commented Nov 29, 2017

This issue is fixed by: ocaml/opam-repository#10885

@ghost ghost closed this as completed Nov 29, 2017
This issue was closed.
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

3 participants