-
Notifications
You must be signed in to change notification settings - Fork 39
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
Upgrade to opam 2, switch the build system to Dune and make ppx_tools.metaquot usable with dune #67
Conversation
I looked at what is installed by the package and tested with reverse dependencies, so I'm confident enough. I noticed one issue with one package (ppx_deriving) due to changes to the META file, though the fix in ppx_deriving is trivial. I'm also happy to be added as maintainer of ppx_tools so that I can quickly release a fix if needed. |
I wonder if we shouldn't just merge ppx_tools and ppx_tools_versionned. users should go with the later anyway, and it uses omp, which avoids the need for this micro-driver. |
Yeah, that make sense. @alainfrisch and @let-def what do you think? Maybe we should reuse the name |
I propose this because the micro-driver module you added bother me a little bit, and I want to avoid yet-another-ppx-driver. omp has one and it's clearly going to be the main non-jst driver, going forward, so it's better to use that one. Apart from that particular point, the patch looks good, and I trust @diml to know how to write dune files. :) |
Ok. As a first step, I can also update this PR to use the omp driver and get rid of the micro driver. Are you happy with ppx_tools depending on omp? |
I'm of the opinion that every ppx should use omp, so yes. If @alainfrisch agrees in making ppx_tools and ppx_tools_versionned converge, then we can proceed. |
I agree that I don't think it makes sense to put genlifter in a versioned ppx_tools (unless someone find a clear semantics for that, that could not be achieved by simpler means). The intuitive version-agnostic behavior can be recovered by composing a version-specific genlifter with omp:
So what about merging |
That seems fine to me. In ppxlib we have something that serves a purpose slightly similar to utop # #require "ppxlib.traverse";;
utop # type t = A of string [@@deriving traverse_lift];;
type t = A of string
class virtual ['res] lift :
object
method virtual constr : string -> 'res list -> 'res
method virtual string : string -> 'res
method t : t -> 'res
end
# let x = object(self)
inherit [_] lift as super
method constr name args = `Constr (name, args)
method string x = `String x
end;;
val x : (_[> `Constr of string * 'a list | `String of string ] as 'a) lift =
<obj>
# x#t (A "hello");;
- : _[> `Constr of string * 'a list | `String of string ] as 'a =
`Constr ("A", [`String "hello"]) The part that it doesn't cover is importing a type from an external library. Though this can be covered by other tools such as ppx_import. We also have a small piece of code to do that in |
Gentle ping. @alainfrisch what do you think of the idea of merging |
Yes, we should definitely merge ppx_tools and ppx_tools_versioned. Btw, I'm more than happy to completely hand over maintenance of ppx_tools. |
Could be a candidate for OCaml community group then? |
Are there any recent developments on this one? It would be a good thing to include for a new release, along with OCaml 4.08 support. |
Not on my side. I'm now focusing most of my ppx time towards building the future of ppx. |
Ok, then I rebased myself #74 |
Thanks :) Closing this then |
This PR switches the build system to dune, upgrades the opam file to opam 2 and adds a bit of glue code so that ppx_tools.metaquot can be easily used with dune.