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 switch import doesn't set invariant #5933
Comments
I confirm, this is still the case with opam 2.2 |
Are you importing in a switch that already exist ? |
yes, but in any case it should be done. One thing that's also broken is that exporting a switch doesn't export the invariant, only the "compiler packages" so exporting/importing does result in the same invariant. |
The current workflow is to not update the invariant when the switch already exists. The idea behind is if the switch already exists, user already set the invariant. Imported switch will then result on pinning and trying to install mentioned packages. In the case where the switch doesn't exist, yes, the invariant should be the same than the previous switch. As the invariant is inferred, we need to add the information in the export file and update the format. |
I had the issue when importing in a non existing switch I believe. |
That one particular case is fixed in 2.2 then (the rest is still to be fixed ofc) |
tested with opam 2.1.2, I don't know what's the status with opam 2.2
I have an export file which contains
I believe that it corresponds to the invariant of the switch, but I might be wrong.
If I do
opam sw import --sw=. sw.export
andopam sw invariant
it appears that my switch has no invariant set.I have to do
opam sw import --sw=. sw.export --packages=ahrefs-setup,ocaml-base-compiler.4.14.0
to get things setup as expected.The text was updated successfully, but these errors were encountered: