Skip to content

Conversation

@NathanReb
Copy link
Collaborator

We unintentionally broke traverse in #196 by not declaring it as a ppx anymore. This PR reverts this but also make it a deriver (which it is) instead of a rewriter.

Even though it was working perfectly well being declared as the latter, I think this will improve compat with ppx_deriving.

Signed-off-by: Nathan Rebours <nathan.p.rebours@gmail.com>
@NathanReb NathanReb requested review from a user and pitag-ha January 21, 2021 17:35
@NathanReb NathanReb requested a review from ceastlund as a code owner January 21, 2021 17:35
Signed-off-by: Nathan Rebours <nathan.p.rebours@gmail.com>
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks good

@NathanReb NathanReb merged commit 1dc8fa2 into ocaml-ppx:master Jan 22, 2021
NathanReb added a commit to NathanReb/opam-repository that referenced this pull request Jan 22, 2021
CHANGES:

- Fix ppxlib.traverse declaration and make it a deriver and not a rewriter
  (ocaml-ppx/ppxlib#213, @NathanReb)
- Driver (important for bucklescript): handling binary AST's, accept any
  supported version as input; preserve that version (ocaml-ppx/ppxlib#205, @pitag-ha)

- `-as-ppx`: take into account the `-loc-filename` argument (ocaml-ppx/ppxlib#197, @pitag-ha)

- Add input name to expansion context (ocaml-ppx/ppxlib#202, @pitag-ha)

- Add Driver.V2: give access to expansion context in whole file transformation
  callbacks of `register_transformation` (ocaml-ppx/ppxlib#202, @pitag-ha)

- Driver: take `-cookie` argument into account, also when the input is a
  binary AST (@pitag-ha, ocaml-ppx/ppxlib#209)

- `run_as_ppx_rewriter`: take into account the arguments
  `-loc-filename`, `apply` and `dont-apply` (ocaml-ppx/ppxlib#205, @pitag-ha)

- Location.Error: add functions `raise` and `update_loc`
  (ocaml-ppx/ppxlib#205, @pitag-ha)
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.

1 participant