-
Notifications
You must be signed in to change notification settings - Fork 372
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
Rationale behind upgrading all dependent packages when pinning a package to the already installed version #6111
Comments
I'm not sure the change of behaviour was intentional, however
You mean like pinning several packages in a single command or something else? Otherwise i'm not sure, i think pinning is probably the best way i can think of right now. Just in case that helps we've added |
What I want to do is install many packages in parallel and pin some of them to specific versions. Currently I do this in a two step process: first install the many packages in parallel and then pin some packages with a separate opam call. |
ah, you'd want something like From a UX perspective i'm not sure i like this, however we could think of supporting |
Thanks - I was not aware of the I guess I could just replace the
What is wrong with this besides that it is not so obvious? |
no no, what i meant is "we could do it but this feature does not exist currently" |
this + mixing the pin mechanic with the install command is currently only done for local projects and i feel like allowing it more generally would add a confusing feature in terms of design and would tie more knots between the two mechanics in our codebase internally. Pinning is a tricky feature and can get arbitrarily complicated (e.g. #3202) and adding such a syntactic sugar feels to be like a trap in terms of feature creep. |
In Coq Platform CI (which is heavily opam based) I see a change in behaviour after updating to opam 2.2: when I pin a package to the version it already has, opam upgrades all packages depending on this package. See e.g. this CI log:
https://github.com/coq/platform/actions/runs/10037269557/job/27736704911#step:5:721
Before Coq 8.15.2 has been installed already - at the point above it is pinned to 8.15.2 which has the effect you see below this point in the log.
This was not so in opam 2.1.X. I can live with this - I now added
--no-action
to the pin commands (CI is still running but I guess this has the desired effect), but I wonder if this change is intended and if so what the rationale behind it is.A note: I install many packages in parallel with a single request, both for performance reasons and also to catch version issues early. Some critical packages (like Coq) I need to pin and I do this after the installation with individual pin commands. Is there a better way of doing this?
The text was updated successfully, but these errors were encountered: