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

Making other deriving plugins work on 4.05 #143

Closed
infinity0 opened this issue Jul 7, 2017 · 18 comments
Closed

Making other deriving plugins work on 4.05 #143

infinity0 opened this issue Jul 7, 2017 · 18 comments

Comments

@infinity0
Copy link

8705088 added 4.05 support but also changed the command-line interface of the ppx_deriving program so that plugin names need to be prefixed with an extra -deriving-plugin flag. This is causing build failures like mirleft/ocaml-nocrypto#122. I'm not sure how to tell the tooling to pass this flag in, but it seems like it should be done automatically by ppx_deriving rather than requiring everyone to edit their build scripts.

@gasche
Copy link
Contributor

gasche commented Jul 16, 2017

This should be fixed by #141 once it is merged.

@samoht
Copy link

samoht commented Jul 25, 2017

Yes please :-)

@whitequark
Copy link
Collaborator

Triage: #141 merged but other derivers still broken, more work required.

@infinity0
Copy link
Author

Part of the discussion there suggested that certain Jane Street packages need an update, I was able to build stuff using their development repo. @diml ?

@ghost
Copy link

ghost commented Oct 14, 2017

This affects me as well, and we're already in 4.06's beta cycle. Any predictions when this (and ocaml-ppx/ppx_deriving_yojson#56) will be resolved?

@gasche
Copy link
Contributor

gasche commented Oct 30, 2017

We have a plan for a maintenance release of ppx-deriving 4.1, in the next few days, to support OCaml 4.05 and 4.06. Hopefully we can also do the same for ppx_deriving_yojson. So I would say that the current plan is to resolve this within the week. Sorry for the slow time working out the best short-term solution.

@ghost
Copy link

ghost commented Nov 14, 2017

@gasche, sounds good. If you don't mind, please keep us updated here.

@gasche
Copy link
Contributor

gasche commented Nov 18, 2017

Update: I have updates in the pipeline for ppx_deriving to support 4.05 and 4.06, and the plan is to make a maintenance release of ppx_deriving 4.2 first, and then release plugins on top of it (ppx_deriving_{hardcaml,protobuf,yojson}) which also have their 4.06-support PRs.

@gasche
Copy link
Contributor

gasche commented Nov 21, 2017

@Tuncer ppx_deriving 4.2.1 was just released with support for 4.05 and 4.06. If you are a user of ppx_deriving, feedback on whether this release works for you would be very useful. Note that the ppx_deriving plugins (yojson, protobuf etc.) have not been updated yet, but this should come shortly.

If the driverization change in 4.2 proves to still break user's code, I will make a maintenance release of the 4.1 version, but hopefully 4.2 works.

@ghost
Copy link

ghost commented Nov 21, 2017

@gasche, out of the various packages I install in each switch by default, ulex is the only one that's still 4.06-incompatible, and that has been fixed today (ocaml-community/ulex@306f31f). But it's not released into opam yet.

Was I not supposed to be able to install yojson? It works for me.

@gasche
Copy link
Contributor

gasche commented Nov 21, 2017

ppx_deriving_yojson does not compile under 4.06 ( see pull request to fix this at ocaml-ppx/ppx_deriving_yojson#66 ). You may be using just the yojson package, or another ppx-deriver for it.

@ghost
Copy link

ghost commented Nov 21, 2017

Right, it's just yojson.

@shonfeder
Copy link
Contributor

shonfeder commented Nov 21, 2017

I just switched to 4.06 to try this out. I think I must be doing something wrong, as trying to install ppx_deriving gives a constraint violation, and trying to pin ppx_deriving to 4.2.1 says that no such version exists:

$ opam switch show
4.06.0

$ opam --version
1.2.2

$ opam install ppx_deriving
[ERROR] ppx_deriving is not available because your system doesn't comply with ocaml-version > "4.03.0" & opam-version >= "1.2"
        & ocaml-version < "4.06.0".

$ opam install ppx_deriving 4.2.1
[ERROR] No package named 4 found.

$ opam pin add ppx_deriving 4.2.1
[ERROR] Package ppx_deriving has no version 4.2.1

(Just to be clear, while I am fighting my own battles with ppx_deriving and yojson, this is meant as an attempt to "be useful" rather than a complaint.)

@ghost
Copy link

ghost commented Nov 21, 2017

@shonfeder, it's still 4.2 (not 4.2.1) in the opam repo. Though to be clear, I wasn't installing ppx_deriving explicitly, and whatever else has been made compatible with 4.06 was enough for me to miss just ulex. Sorry, if my success report was misleading.

@gasche
Copy link
Contributor

gasche commented Nov 21, 2017

No, 4.2.1 should be in the opam repo now, you should see it with opam update. @shonfeder the syntax is opam install ppx_deriving.4.2.1, not ppx_deriving 4.2.1, to force a specific version.

@shonfeder
Copy link
Contributor

shonfeder commented Nov 21, 2017

Ah! My mistake. Thank, you @gasche, that worked for the installation.

@ghost
Copy link

ghost commented Nov 21, 2017

Confirmed it's visible in opam now.

@kit-ty-kate
Copy link
Collaborator

(this looks fixed so i closed it)

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

No branches or pull requests

6 participants