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

Using show {with_path = false} results is error #149

Closed
bikallem opened this issue Sep 9, 2017 · 6 comments
Closed

Using show {with_path = false} results is error #149

bikallem opened this issue Sep 9, 2017 · 6 comments

Comments

@bikallem
Copy link
Contributor

bikallem commented Sep 9, 2017

I am attempting to use show {with_path = false} however, the compiler complains with the following error:
Error: non-optional labeled argument expected

The following sample code fails in both toplevel and ocamlc.
module X = struct type t = C [@@deriving show { with_path = false }] end;;

@gasche
Copy link
Contributor

gasche commented Sep 10, 2017

I am unable to reproduce it under master or v4.2 under 4.05.0, and under 4.1 and 4.04 ppx-deriving complains that show does not support option with_path. What ppx-deriving and OCaml versions are your using?

@bikallem
Copy link
Contributor Author

I am using ocaml 4.05.0, jbuilder 1.0+beta13, and ppx_deriving 4.2

@bikallem
Copy link
Contributor Author

@gasche I tried the following,
opam pin add ppx_deriving https://github.com/ocaml-ppx/ppx_deriving.git#master
on 4.05.0+flambda but am getting the same error. Any tips?

@copy
Copy link
Contributor

copy commented Sep 20, 2017

It's probably this issue with ppx_type_conv: janestreet-deprecated/ppx_type_conv#9

@bikallem
Copy link
Contributor Author

@copy Indeed, this issue seems related to ppx_type_conv and/or ppx_driver. I was using ppx_hash and ppx_compare along with ppx_deriving and I faced this issue. I removed the both ppx_hash and ppx_driver from jbuilder rules and with_path seem to work correctly.

@copy
Copy link
Contributor

copy commented Dec 5, 2017

The fixed version of ppx_type_conv has been released in opam, so this issue can be closed now.

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

4 participants