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

The instructions for compiling the repo using opam pin appear to be out of date? #5945

Closed
shonfeder opened this issue May 6, 2024 · 2 comments · Fixed by #5946
Closed

The instructions for compiling the repo using opam pin appear to be out of date? #5945

shonfeder opened this issue May 6, 2024 · 2 comments · Fixed by #5946

Comments

@shonfeder
Copy link
Contributor

shonfeder commented May 6, 2024

The README currently advises

opam/README.md

Lines 18 to 19 in b3d2f5c

Either from an existing opam installation, use `opam pin add opam-devel
--dev`, or:

But to get a working install I actually had to pin all the dependencies of the various opam libraries in the right order. Based on my notes, I think this command should currently give a working install:

opam pin opam-core --dev-repo -y &&\
    opam pin opam-format --dev-repo -y &&\
    opam pin opam-repository --dev-repo -y &&\
    opam pin opam-state --dev-repo -y &&\
    opam pin opam-solver --dev-repo -y &&\
    opam pin opam-client --dev-repo -y &&\
    opam pin add opam-devel --dev -y

I kind of doubt we want to replace the current readme line with this recipe, but maybe we could do something like...

  1. Put it in a script or a phony make target
  2. Change https://github.com/ocaml/opam/tree/b3d2f5c554e6ef3cc736a9f97e252486403e050f/opam-devel.opam so that it includes all the libraries as pin-depends and advise people to pin this package from the source rather than from the opam repo. (I think this would work around the non-transitive nature of pins?)

Hopefully there is a nicer option (I'm happy to help with that), but in the meantime this issue may offer a recipe to help others along who hit the same snag.

@rjbou
Copy link
Collaborator

rjbou commented May 6, 2024

Thanks for the issue and for testing!

Indeed, the pinning command is incomplete. It is better to use pinning with an url instead

opam pin git+https://github.com/ocaml/opam

like that it will pin all packages in the same time.

@shonfeder
Copy link
Contributor Author

Ah of course. Don't know why I didn't remember this :) thanks!

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

Successfully merging a pull request may close this issue.

2 participants