Closed ejgallego closed 6 years ago
typedtree
mismatches:
arg_label
mutable_flag
payload
Ok, so this seems very close to be ready to support a few OCaml versions after I added a small compatibility layer.
A pitfall remains, I had to comment out the following snippet:
let oval = Primitive.print p oval in
I guess this should be solvable too, I'll have a look to see where the mismatch happens.
FTR, I submitted new releases of ocaml-migrate-parsetree and ppxlib with the necessary fixes:
We'll make a new dune release this week
We'll make a new dune release this week
Thanks a lot @diml , that should allow us to use the CI here.
All the new dependencies are now in opam.
All the new dependencies are now in opam.
Finally!!! That's great, thanks! I wonder tho, will the new packages arrive to OPAM 1.2, or it is too late?
In that case, I'll update the Travis setup to use OPAM 2.0 but that will take me more time.
No problem. I don't think they'll arrive to opam 1.2, IIRC the plan is that the opam 1 repo is now freezed
Et voilà ! There are still minor questions to solve, but this seems to be working.
See updated description.
I'm not sure what should be the review process for this (cc @whitequark who may have an opinion). My inclination would be to try the branch, check that it works on my machine and that I am comfortable with the workflow. If it does and I am, then I would assume that it would also work fine for other people, and merge the PR. Any comments?
that I am comfortable with the workflow.
Indeed the release workflow should need some adjustment, unfortunately dune-release
doesn't seem to support OPAM 2.0 well, so maybe indeed opam-publish
is the way to go for now.
@gasche Looks good to me, please merge as soon as you think it's ready. I have so far been very happy with your stewardship of these packages, I couldn't have done it better.
Thanks a lot @gasche @whitequark ; code wise I think the only question remaining is what is the role of Primitive.print
[which I had to disable as not to mess a bit with conversion]
Indeed the release workflow should need some adjustment, unfortunately
dune-release
doesn't seem to support OPAM 2.0 well, so maybe indeedopam-publish
is the way to go for now.
Dune release now supports OPAM 2.
Just thought I'd ping on this PR, since it sounds ready to go. I've hit a couple cases where I would I could have used ppx_import in dune project recently.
Indeed thanks @shonfeder . There is a nit to solve maybe but otherwise the approach seems to work fine.
Dear @gasche , @whitequark , this seems stuck.
I'd be great if we could move it forward as it would allow a significant part of the toolchain we use to move to Dune.
What would you propose to try advance it? Thanks!
I would be happy to try to look for a ppx expert that could act as a shepherd if you think that may be an option and you both are busy.
Yes, I've been too busy to properly deal with this (I did try to build from your branch and it failed on my machine and I didn't have the time to understand what was broken in my build environment), and I think your idea of getting an external reviewer is good. (Usually I would ask @let-def, who loves the ppx stuff, but I don't know for this one.)
I think Primitive.print
does need to be fixed. What it does is to handle external foo : ... = ...
in signatures, and a ppx-import plugin may rely on those. Do you think it would be possible to keep OCaml-version-dependent logic just for this feature? (You could isolate it in a small submodule that would be the only one to use cppo.)
Hi @gasche , OK, I'll ask around.
I don't think the Primitive.print
will need cppo
, but let's see how it goes.
I asked myself whether it could be just copied over within ppx-import, but the logic is actually quite subtle now with the [@unboxed]
attributes and in general attribute handling, so I don't think it is very reasonable to duplicate the standard implementation on versions 4.03 or above.
Thanks @gasche , it turns out the Outcometree
problem was a silly capturing one; I realized after writing the useless migration function.
IMHO this is ready and the review seems pretty straightforward. The workflow should also be pretty easy; dune-release
works for the package and seems to produce working packages.
I'd like to say I've tested this with my 2 packages and it works very beautifully.
I had given a very quick try to an earlier version of the PR, and it didn't build on my machine (I didn't have any time to investigate so I kept quiet about it). I just gave it another try and it seems to be working perfectly on either 4.02.2 and 4.07.1.
I'll merge now. This has waited too long, and it brings a very nice simplification by removing the version-specific code, enabling merlin, and bringing the nice dune features. Thanks a lot for your patience, @ejgallego.
Thanks to you @gasche , and of course to all that helped!
I will try to upload a OPAM package generated with dune-release
to OPAM, let's see how CI goes for this one, then maybe it would be convenient to do a release.
Fixes #26. Changes:
cppo
in favor of ocaml-migrate-parsetreeAsttypes
topkg
in favor ofdune-release
.gitignore
We had to raise dependencies on quite a few packages, thus ppx_import now requires OCaml >= 4.04.2.
The question of whether we should use
ppx_tools_versioned
orppxlib
does remain, but it can be addressed at a later point.