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

Add support for ppxlib 0.23.0 #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kit-ty-kate
Copy link
Contributor

ppxlib will come without OMP starting with ppxlib.0.23.0.
A few changes were needed to match the new module location with what metaquot expects.

cc @pitag-ha

@pitag-ha
Copy link

pitag-ha commented Jun 14, 2021

Update: Ignore this comment :) As pointed out below, it's wrong.

Thanks for the fix, @kit-ty-kate!

I was thinking if it would make sense to add a ppxlib < 0.23.0 constraint to metaquot instead of referencing the internal library Astlib__. I've just had a look and there are currently 6 opam packages that depend on metaquot. Two of them (ppx_pbt and traverse) practically don't seem to use it anymore, so we could (and should) also drop it from their opam file; the other four (clangml, override, refl and pattern) are based on ppxlib already, so if I'm not missing anything we could use ppxlib.metaquot there instead.

In general (also for unpublished packages), if the package is based on new ppxlib it should be able to use ppxlib.metaquot, if I'm not missing anything. Is that right? Do you know of any cases where it needs to use metaquot instead of ppxlib.metaquot, @thierry-martinez and @kit-ty-kate?

Also, @thierry-martinez, I've seen that 5 out of the 6 opam package I've mentioned above are yours: does it sound right to you what I've said about them?

@kit-ty-kate
Copy link
Contributor Author

I was under the impression that metaquot and ppxlib.metaquot had different goals/features as it was created well after it were available (this project was created just last year), though I might be mistaken.

@pitag-ha
Copy link

Oh ok, thanks for pointing that out @kit-ty-kate, sorry for that!

| Ldot (Lident "Location", "t") -> "location"
| Ldot (Lident "Longident", "t") -> "longident"
| Ldot (Lident "Location", "t") (* ppxlib < 0.23.0 *)
| Ldot (Ldot (Lident "Astlib__", "Location"), "t") -> (* ppxlib >= 0.23.0 *)
Copy link

Choose a reason for hiding this comment

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

By any chance, is it possible to use the public path to Location, so Ppxlib_astlib.Location.t , instead of the private one, i.e. Astlib__.Location.t, here? And in case that's possible, same for Longident below.

@pitag-ha
Copy link

pitag-ha commented Sep 7, 2021

The ppxlib version @kit-ty-kate has mentioned above 0.23.0 has been released now. So for this metaquot extension to stay compatible with new ppxlib versions, it would be great to address this PR now.

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.

2 participants