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

Relaxing "at least one record" restriction #3

Closed
ozanmakes opened this issue Jul 12, 2018 · 4 comments
Closed

Relaxing "at least one record" restriction #3

ozanmakes opened this issue Jul 12, 2018 · 4 comments

Comments

@ozanmakes
Copy link

ozanmakes commented Jul 12, 2018

I'd like to use ppx_fields_conv with atdgen but check_at_least_one_record calls prevent it since -deriving-conv fields flag appends [@@deriving fields] to each type including variants.

Removing the check works well, non-applicable types seem to be silently ignored. Is it possible to relax this restriction?

@ghost
Copy link

ghost commented Jul 31, 2018

What is -deriving-conv?

@ozanmakes
Copy link
Author

@diml it's an atdgen flag for specifying ppx_deriving plugins to use with generated types:

  -deriving-conv 
    GEN1,GEN2,...
         Insert 'with GEN1, GEN2, ...' after OCaml type definitions for the
         ppx_deriving preprocessor

@ghost
Copy link

ghost commented Jul 31, 2018

I see. I'm not keen on removing this check as it means that a misplaced [@@deriving fields] will be silently ignored, which is not good.

@ozanmakes
Copy link
Author

That's totally fair. Closing as this is not hard to work around.

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