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

Assert_failure src/repository/opamDownload.ml:140:2 #148

Open
andrew-appel opened this issue Apr 13, 2023 · 4 comments
Open

Assert_failure src/repository/opamDownload.ml:140:2 #148

andrew-appel opened this issue Apr 13, 2023 · 4 comments

Comments

@andrew-appel
Copy link

Running on MacOS 13.3.1, with all the expected things recently installed in homebrew, with a recently installed opam 2.1.4, with a freshly installed opam-publish 2.2.0, I get this error message:

% opam publish
[ERROR] Uncaught exception: "Assert_failure
        src/repository/opamDownload.ml:140:2"

I am in commit 54d8f40 of my vcfloat repository.

Is there some workaround for publishing my opam package?

kit-ty-kate added a commit to kit-ty-kate/vcfloat that referenced this issue Apr 13, 2023
The url field has no effect here and causes opam-publish to have an assert failure. See ocaml-opam/opam-publish#148
@andrew-appel
Copy link
Author

Thank you. That answers another question I had, as a first-time "opam publish" user: Isn't there a circularity between creating a release (which creates the .gz file), versus creating the .opam config file, which contains that url? So now my question is answered. But it would have been better if the reference manual had explained that, because I spent several minutes rereading that chapter before giving up on finding my answer to that question.

@kit-ty-kate
Copy link
Contributor

The assert failure comes from https://github.com/ocaml/opam/blob/2.1/src/repository/opamDownload.ml#L140 which is telling you that the mode (git) for the url field is unsupported.

The url field in a source repository has no effect and is not wanted anyway. I've removed it in your repository in VeriNum/vcfloat#15

In any case we should detect that before the assert happens and display some error message in opam-publish.

As for the circularity question I've seen some users also wonder about this and we should definitely add a warning and document this. I've opened a ticket in ocaml/opam#5509 for that purpose.

Thanks for opening this issue.

@andrew-appel
Copy link
Author

I just learned (from other sources) that my coq-vcfloat package should not really go in the main opam repo, but in the github.com/coq/opam-coq-archive, so I won't be doing an opam-publish at all.

@kit-ty-kate
Copy link
Contributor

you can still use opam-publish with its --repo and --packages-directory options:

opam publish --repo=coq/opam-coq-archive --packages-directory=released/packages

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

2 participants