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

make ppx_tools an optional dep in OPAM #266

Closed
lefessan opened this issue Jul 13, 2016 · 3 comments
Closed

make ppx_tools an optional dep in OPAM #266

lefessan opened this issue Jul 13, 2016 · 3 comments
Labels

Comments

@lefessan
Copy link

I recently tried to install lwt with 4.04.0+trunk, and it failed because ppx_tools is not yet compatible with that version. However, setting ppx_tools as an optional dep (because I use a copy of the opam repository that I could easily modify...), I could finally install it.

My suggestion:

  • set ppx_tools as an optional dependency of lwt in opam
  • create a package lwt+ppx, with no sources, but that depends on both lwt and ppx_tools. Packages that depend on the ppx syntax of lwt would then use a dependency on that new package instead of the one on lwt.
@aantron
Copy link
Collaborator

aantron commented Jul 18, 2016

Not a bad suggestion, but following it exactly will have to wait, as it will be a breaking change for some users. See also #41.

@aantron aantron added this to the Packaging milestone Jul 18, 2016
@Drup
Copy link
Member

Drup commented Jul 20, 2016

I don't think that's a good idea, users expect to have the ppx on the relevant version of ocaml+lwt.

@lefessan The right solution for you is to make base-no-ppx available on 4.04, via a pin. It's a simple one liner, and it doesn't bother non-bleeding edge users. See ocaml/opam-repository#6373

@aantron
Copy link
Collaborator

aantron commented Nov 21, 2016

@Drup's suggestion is the right way.

I'm not sure how to pin base-no-ppx with a one-liner, but it can be done like this:

mkdir base-no-ppx
echo 'opam-version: "1.2"' > base-no-ppx/opam
opam pin add -y base-no-ppx base-no-ppx

Remove the OCaml version constraint when the editor comes up, and base-no-ppx should install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants