-
Notifications
You must be signed in to change notification settings - Fork 358
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
Invalidate plugins at root upgrade #4619
Comments
(NB - this should resolved before the release candidate but that resolution may be "won't fix") |
Hmm, this feels to me that the problem comes from linking to Handling this correctly I think would mean removing or recompiling the plugin package itself -- and not just the link -- during format upgrade... which would be quite involved and also mean many more things could go wrong during format upgrades :/ so not much better. Another workaround could be to run a check on Maybe it's not that big a problem that |
It seems better to have some plugins unnecessarily rebuilt after a format upgrade than have some which did need rebuilding just be broken? We can't fix it with an opam-state message - the fix needs to be in the old version of the library rather than the new, sadly (the proverbial cat is out of the bag!) We could cache the validity of packages in the switch state to save loading the entire universe state? |
We've got to update opam-dune-lint anyway, so we can just require opam-state >= whatever version has the check. |
This
Dockerfile
fails at the final step:The reason is that
opam-dune-lint
was compiled withopam-state
2.0.x and then the root gets upgraded. ocurrent/opam-dune-lint#26 proposes fixing its dependencies to requireopam-state
at least matching the opam version. This fixes manually installingopam-state
2.0.x in a 2.1 root by forcing the plugin to be uninstalled (cf. ocurrent/opam-dune-lint#26 (comment)), but I think we need to do something about the upgrade case too.A simple option would be to delete all the symlinks in
plugins/bin
as part of the format upgrade, but that doesn't work in this case where the plugin is installed in the current switch. More complex solutions might include a validity check on the dependencies of a plugin (possibly just once after upgrade?) - if the pin is changed tobf451c8cf2d4f2be3c7d979b613c79588b55a172
, thenopam-dune-lint
definitely needs recompiling after the root upgrade (opam update
will catch that) but it would also be detectable that the current installation is invalid soopam dune-lint
could refuse to run the plugin without reinstallation?Thoughts, @AltGr? It will affect any plugin which uses the opam libraries which, ideally, should be all of them!
The text was updated successfully, but these errors were encountered: