Skip to content

make ppx_tools an optional dep in OPAM #266

Closed

Description

@lefessan

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.

Activity

  1. aantron commented on Jul 18, 2016

    @aantron
    Collaborator

    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.

  2. added this to the milestone on Jul 18, 2016
  3. Drup commented on Jul 20, 2016

    @Drup
    Member

    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

  4. aantron commented on Nov 21, 2016

    @aantron
    Collaborator

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions