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

ppxlib 0.27 compatibility #146

Merged
merged 2 commits into from
Jul 15, 2022

Conversation

anmonteiro
Copy link
Contributor

Starting with ppxlib 0.27 and ocaml-ppx/ppxlib#344, generated code has annotations which broke this repo.

@kit-ty-kate kit-ty-kate requested review from pitag-ha June 23, 2022 10:33
Copy link
Member

@pitag-ha pitag-ha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, thanks for fixing this (must have slipped through somehow when I released 0.27.0)!

I would not use metquot for direct quotation + anti-quotation (i.e. the identity) at all. See my comment below.

@@ -437,7 +437,7 @@ let ser_str_of_type ~options ~path ({ ptype_loc = loc } as type_decl) =
~attrs:[disable_warning_39 ()]
(Pat.constraint_ var poly_type)
(polymorphize [%expr ([%e sanitize ~quoter serializer])])],
[Str.value Nonrecursive [Vb.mk [%expr [%e pvar "_"]] [%expr [%e evar var_s]]] ]
[Str.value Nonrecursive [Vb.mk [%pat? [%p pvar "_"]] [%expr [%e evar var_s]]] ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Str.value Nonrecursive [Vb.mk [%pat? [%p pvar "_"]] [%expr [%e evar var_s]]] ]
[Str.value Nonrecursive [Vb.mk (pvar "_") [%expr [%e evar var_s]]] ]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And similarly in the other diffs.

@anmonteiro
Copy link
Contributor Author

@pitag-ha you are, of course, correct. I just pushed a commit fixing your suggestions.

@gasche
Copy link
Contributor

gasche commented Jul 15, 2022

This is obviously an improvement, so merging. Thanks @anmonteiro and @pitag-ha for your work on this issue.

@gasche gasche merged commit 5480f63 into ocaml-ppx:master Jul 15, 2022
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

Successfully merging this pull request may close these issues.

3 participants