-
Notifications
You must be signed in to change notification settings - Fork 102
Add mangling utilities from ppx_deriving #370
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
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Simmo Saan <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Simmo Saan <[email protected]>
I'm surprised by the format CI failure:
It's perfectly fine syntax for building the tests themselves. |
Adding helpers for mangling sounds good, thanks for the PR! And thanks for all the nice work you've been doing on About the formatting error: I guess the About polymorphic variants vs non-polymorphic variants for the type. I'm curious now: why have you chosen polymorphic ones? Is it to avoid having to open the module? As an idea about the |
I didn't have a preference either way, so I just kept it like it was in ppx_deriving, but I'm open to changing it.
This is a good point, especially in the broader context of bringing remaining utilities over. Splitting them up too much isn't particularly useful either, given how in ppx_deriving they were all together at the top level anyway. And indeed, it would serve as a broader catch-all for other utilities that exist either in ppxlib's |
Signed-off-by: Simmo Saan <[email protected]>
Signed-off-by: Simmo Saan <[email protected]>
Signed-off-by: Simmo Saan <[email protected]>
I now implemented the suggested changes, thanks to the reminder from release. |
Thanks a lot for the PR, and sorry for the very long delay! It looks good to me, but I still have some suggestions regarding the structure. I think the toplevel I opened a PR on your fork where I implemented the reorganization with |
I accidentally pushed my PR in this branch. I have reverted this, I prefer that you accept (or not) my suggested modifications on the PR on your fork. |
Well, if nothing is yet using the Or could have But those are just a few thoughts. I personally don't have an issue with the fully nested structure you proposed. This just came to mind because @pitag-ha's idea above was to have one more general module rather than separate ones like |
Hmm I think I got lost with backward compatibility... Of course if |
Then the current state of this PR achieves the sensible approach with
How about we leave any sort of move of |
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.
Looks good to me! Thanks a lot.
I'll soon do a PR improving ppxlib's API landing page, I can do the Quoter
move in this PR.
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.
Looks good to me as well!
@panglesd, is there a reason why you haven't merged the PR yet? (e.g. is there something else you'd like to merge first?) If not, let's go ahead and merge this PR today.
Also from my side: apologies for the strong delay on this, @sim642. We do appreciate this kind of PRs very much! Re-reviewing it just somehow slipped through.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Simmo Saan <[email protected]>
CHANGES: - Remove `File_path` exports. (ocaml-ppx/ppxlib#381, @ceastlund) - Add `Ppxlib.Expansion_helpers` with name mangling utilities from ppx_deriving (ocaml-ppx/ppxlib#370, @sim642) Signed-off-by: Paul-Elliot <[email protected]>
CHANGES: - Remove `File_path` exports. (ocaml-ppx/ppxlib#381, @ceastlund) - Add `Ppxlib.Expansion_helpers` with name mangling utilities from ppx_deriving (ocaml-ppx/ppxlib#370, @sim642) Signed-off-by: Paul-Elliot <[email protected]>
CHANGES: - Remove `File_path` exports. (ocaml-ppx/ppxlib#381, @ceastlund) - Add `Ppxlib.Expansion_helpers` with name mangling utilities from ppx_deriving (ocaml-ppx/ppxlib#370, @sim642) Signed-off-by: Paul-Elliot <[email protected]>
Part of issue #317.
This is exactly as in ppx_deriving, just in a
Mangle
submodule for slightly better organization (like #95 went toQuoter
).ppx_show contains analogous port of these to ppxlib with the difference that it uses non-polymorphic variants and
mangle_type_decl
returnsstring loc
instead of juststring
. Not sure if there's any preference to deviating/improving(?) from the ppx_deriving interface.