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

doesn't work: custom repo when creating switch #4673

Closed
mimoo opened this issue May 19, 2021 · 4 comments · Fixed by #4675 or #6091
Closed

doesn't work: custom repo when creating switch #4673

mimoo opened this issue May 19, 2021 · 4 comments · Fixed by #4675 or #6091
Assignees
Labels
Milestone

Comments

@mimoo
Copy link

mimoo commented May 19, 2021

In the manual:

Prepare a local switch for building the packages defined in ./. This scans the current directory for package definitions, chooses a compatible compiler, creates a local switch and installs the local package dependencies.

opam switch create trunk --repos default,beta=https://github.com/ocaml/ocaml-beta-repository.git ocaml-variants.4.10.0+trunk

This command fails with:

Creating repository beta...
[ERROR] Could not update repository "beta": OpamDownload.Download_fail(_, "curl: code 404 while
        downloading https://github.com/ocaml/ocaml-beta-repository.git/index.tar.gz")
[ERROR] Initial fetch of these repositories failed: beta

I also tried with my own custom repo and it fails with the same error.

(opam version 2.0.8)

@dra27
Copy link
Member

dra27 commented May 20, 2021

That's embarrassing, the manual is wrong! It should be beta=git+https://.

@AltGr - is repo type inference supposed to work here?

@dra27
Copy link
Member

dra27 commented May 21, 2021

Re-opening - the docs are fixed; but it's inconsistent that opam repo add beta https://github.com/ocaml/ocaml-beta-repository.git works but opam switch create foo beta=https://github.com/ocaml/ocaml-beta-repository.git --empty doesn't.

@dra27 dra27 added this to the 2.2.0~alpha milestone May 21, 2021
@mimoo
Copy link
Author

mimoo commented May 21, 2021

opam pin add lib https://github.com/mimoo/lib also takes a URL without the git+

@dra27 dra27 self-assigned this Jul 2, 2021
@dra27
Copy link
Member

dra27 commented Jul 2, 2021

This can be changed in the default CLI for 2.2+

@dra27 dra27 added the AREA: UI label Jul 16, 2021
@dra27 dra27 removed this from the 2.2.0~alpha milestone May 17, 2022
Keryan-dev added a commit to Keryan-dev/opam that referenced this issue Jul 11, 2024
Keryan-dev added a commit to Keryan-dev/opam that referenced this issue Jul 16, 2024
Keryan-dev added a commit to Keryan-dev/opam that referenced this issue Jul 18, 2024
@kit-ty-kate kit-ty-kate added this to the 2.3.0~alpha milestone Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants