-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
"Sticky" (pinned?) --deps-only #3123
Comments
Indeed, I see that it would be useful. Not really a full feature, but a quick fix to make the situation just a little better could be to add an option to Another idea (probably a bad one, but consistent in a way) would be that |
(Forgot to mention that a full-fledged solution would be possible, if more involved: it would involve adding one more package status (besides 'installed' and 'removed') to keep the record of the package's constraints. It would be a deep change (even package listings, etc. would need to be updated) and need some hacks around the solver, though) |
An option |
If a package depends on "Coq 8.7.x", this would fix the Coq version -- whereas ideally, it should still be possible to update from Coq 8.7.0 to 8.7.1. Would a lock file be able to properly handle this? |
No, the only way to ensure a constraint like |
Use-case: We are using opam to describe the (build-)dependencies of our project. We would like to provide a
make build-dep
that will install the dependencies in such a way that a futureopam upgrade
does not invalidate them.It is tempting to use
opam install --deps-only
for this, but that does not work (and I am not talking about the related issue #2764 here, which was solved with opam 2):--deps-only
makes sure that dependencies are satisfied right now, but leaves no trace about this in the state so thatopam upgrade
feels free to break the dependencies again.What we currently do is rather horrible: We use
sed
to patch theopam
file to create a package called$PACKAGE-builddep
that has empty build and install scripts, but the same dependencies as the main package. Then we install that. This has the same effect as--deps-only
in that dependencies of the main package get installed, but moreover,opam upgrade
considers the dependencies of$PACKAGE-builddep
as constraints and thus does not break the build.it would be great if opam could provide this somehow more streamlined. However, I am not aware of any package manager that does...
The text was updated successfully, but these errors were encountered: