-
Notifications
You must be signed in to change notification settings - Fork 371
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 2.1~alpha3] Switch invariant is trying to be too clever #4333
Comments
Well, the idea is that the invariant is exactly what you specified, no more or less; but indeed it changes from 2.0 where the choice was made and fixed at switch creation time. If we put aside the question of the additional stress put on the solver (we'll discuss it in #4322), the idea is that anyway the solver is set to minimise the changes, so once a compiler is chosen, it won't be changed anyway except if:
these 3 cases are generalisations, and would have been errors in 2.0 so, solver stress apart, this sounds OK to me.
This is not entiterly true: in 2.0,
In case1., the newer opam will do the same (but leave the door open for a change later on, if required) |
I was going to close this issue, however I found a related bug, where if the compiler package has been pinned before the upgrade to opam 2.1, the invariant will be set to "any versions of the compiler package" because it only sees one. Test case:
Result:
|
Superseded by #4501 |
While testing things for #4332 I created a switch supposedly to install
ocaml-base-compiler.4.11.0
, however the switch invariant seems a bit unsure when a system install with the same version is already installed:I believe the same performance issue and undesired recompilation can happen in this situation too (see #4332)
Also in this case, it creates a shift from previous versions of opam where users would expect this switch to be a non-system switch and stay this way.
The text was updated successfully, but these errors were encountered: