-
Notifications
You must be signed in to change notification settings - Fork 47
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
Port to ppxlib and OCaml 4.11 (continuation of #111 and #118) #121
Conversation
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Suggested by Gabriel Scherer: ocaml-ppx#111 (comment)
Suggested by Gabriel Scherer: ocaml-ppx#111 (comment) and ocaml-ppx#111 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice, thanks! (And thanks to @rgrinberg and @kit-ty-kate of course.)
One uninformed question: there is a deep change in the way locations are being handled, now they are threaded through the plugin as a new parameter. This is a new change you made. Can you explain why it is necessary? (I guess this is something about a difference in the way ppx_metaquot vs. ppxlib's metaquoter work?)
Is this something that should be documented for other authors of ppx_deriving plugins? (Do I correctly understand that this means that the ppxlib change has more severe backward-compatibility implications than we thought at first?)
Yes, |
Let me go ahead and merge this one as well. Thanks @thierry-martinez and @rgrinberg ! It is not completely clear when we will be ready to migrate all ppx_deriving plugins to the ppxlib approach (for example we found an upstream bug in the process, ocaml-ppx/ocaml-migrate-parsetree#97 , and I wonder if we should wait for it to be fixed; there are some compatibility issues that need ironing out or careful documentation). What @thierry-martinez proposed is thus to create |
CHANGES: * Update to ppx_deriving 5.0 and ppxlib (ocaml-ppx/ppx_deriving_yojson#121) Rudi Grinberg, Thierry Martinez, Kate Deplaix and Gabriel Scherer * Fix issues when the equality operator `(=)` is shadowed (ocaml-ppx/ppx_deriving_yojson#126, ocaml-ppx/ppx_deriving_yojson#128, fixes ocaml-ppx/ppx_deriving_yojson#79) Martin Slota, Kate Deplaix
CHANGES: * Update to ppx_deriving 5.0 and ppxlib (ocaml-ppx/ppx_deriving_yojson#121) Rudi Grinberg, Thierry Martinez, Kate Deplaix and Gabriel Scherer * Fix issues when the equality operator `(=)` is shadowed (ocaml-ppx/ppx_deriving_yojson#126, ocaml-ppx/ppx_deriving_yojson#128, fixes ocaml-ppx/ppx_deriving_yojson#79) Martin Slota, Kate Deplaix
This pull-request pursues the work that @rgrinberg and @kit-ty-kate started to port
ppx_deriving_yojson
toppxlib
and OCaml 4.11. See #111 and #118.My commit includes only minor modifications for location handling. Previously,
!Ast_helper.default_loc
was used without being initialized: I tried to use more precise location informations when available.