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

opam-nix does not error out when pinning dependencies failed, making debugging difficult #92

Closed
kentookura opened this issue Jul 24, 2024 · 4 comments

Comments

@kentookura
Copy link

kentookura commented Jul 24, 2024

I would like there to be better error handling when pinning dependencies. I had added a *.opam.template file and the opam file was updated after running dune build. The OCaml environment built successfully, but the pinned dependency was not at the specified version. It turns out that there was an error when pinning the dependency which I only discovered when trying to build the repository with vanilla opam. The error was caused by the fact that the repo that I pinned contained multiple packages which my project depended on, so there was a bounds issue until I added a pin-depends entry for each package in the repo.

I hope I managed to explain what happened clearly enough.

Describe the solution you'd like

Vanilla opam actually fails in this scenario, so at the very least I would like there to be a message that pinning the dependencies failed

@balsoft
Copy link
Collaborator

balsoft commented Jul 24, 2024

Can you provide an example repo?

@kentookura
Copy link
Author

@kentookura
Copy link
Author

Note that pinning ppx_irmin is necessary even though the project has no explicit dependency on that library.

@balsoft
Copy link
Collaborator

balsoft commented Jan 22, 2025

Thanks for discovering this! I've actually found a bug with pin-depends, in that it didn't actually pin the version, only adding it to scope.

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