-
Notifications
You must be signed in to change notification settings - Fork 98
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
Give semantics to reserving attribute namespace with dots #443
Conversation
d599975
to
7d86d54
Compare
Thanks a lot for the PR! I haven't looked at the implementation, but from the description, the change seems an improvement! Apologies for the very long delay in reviewing. I have very few time to allocate to ppxlib, but I hope to be able to review this week. |
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.
Thanks! Both semantics and implementation look good to me. Also thanks for the code comments, they've made review a lot fatster!
Signed-off-by: Nick Roberts <[email protected]>
Signed-off-by: Nick Roberts <[email protected]>
Signed-off-by: Nick Roberts <[email protected]>
Signed-off-by: Sonja Heinze <[email protected]>
7d86d54
to
3e137a0
Compare
PD: I've just added a changelog entry:
Let me know if you'd prefer something else. |
Thanks for the review. That changelog entry looks good to me. |
CHANGES: - Fix support for OCaml 5.1: migrated code preserves generative functor warnings, without creating more. Locations are better preserved. (ocaml-ppx/ppxlib#432, @pitag-ha, @panglesd) - Driver: Add `-unused-code-warnings` command-line flag. (ocaml-ppx/ppxlib#444, @ceastlund) - Add `?warning` flag to `Deriving.Generator.make`. (ocaml-ppx/ppxlib#440, @jacksonzou123 via @ceastlund) - Restore the "path_arg" functionality in the V3 API (ocaml-ppx/ppxlib#431, @ELLIOTTCABLE) - Expose migration/copying/etc. functions for all AST types needed by `Pprintast` (ocaml-ppx/ppxlib#454, @antalsz) - Preserve quoted attributes on antiquotes in metaquot (ocaml-ppx/ppxlib#441, @ncik-roberts) - Attribute namespaces: Fix semantics of reserving multi-component namespaces (ocaml-ppx/ppxlib#443, @ncik-roberts)
CHANGES: - Fix support for OCaml 5.1: migrated code preserves generative functor warnings, without creating more. Locations are better preserved. (ocaml-ppx/ppxlib#432, @pitag-ha, @panglesd) - Driver: Add `-unused-code-warnings` command-line flag. (ocaml-ppx/ppxlib#444, @ceastlund) - Add `?warning` flag to `Deriving.Generator.make`. (ocaml-ppx/ppxlib#440, @jacksonzou123 via @ceastlund) - Restore the "path_arg" functionality in the V3 API (ocaml-ppx/ppxlib#431, @ELLIOTTCABLE) - Expose migration/copying/etc. functions for all AST types needed by `Pprintast` (ocaml-ppx/ppxlib#454, @antalsz) - Preserve quoted attributes on antiquotes in metaquot (ocaml-ppx/ppxlib#441, @ncik-roberts) - Attribute namespaces: Fix semantics of reserving multi-component namespaces (ocaml-ppx/ppxlib#443, @ncik-roberts)
Resolves #442.
This PR gives different semantics to reserving attribute namespaces that contain dots, like "foo.bar". The previous semantics: reserving this namespace has no effect. The new semantics: reserving this namespaces causes attributes of the form
[@foo.bar]
or[@foo.bar.*]
to be treated as reserved.This is technically a backward-incompatible change, as existing reservations of "foo.bar" will start to have an effect. But it's hard to imagine anyone actually intending these reservations to have no effect, and I claim the new semantics is a more reasonable way to handle this case.