-
Notifications
You must be signed in to change notification settings - Fork 365
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 removes package when failing to recompile #3722
Comments
We took extra care in opam 2.0.0 to minimise the removals as much as possible, while guaranteeing that the set of installed packages remains consistent at all times. It seems you have hit a bug, or at least a corner case, though, as in your case the removal should certainly only have been done after the Thanks for reporting. |
Here are the logs and the small The steps to reproduce:
|
Thanks, that will be very helpful! |
This is still a bug in 2.1, and in fact it's got slightly worse. This (opam 2.0.8) doesn't remove ocamlnet:
it fails because pkg-config isn't in the image. Fix that by inserting However, in opam 2.1 (which you can get by putting |
Trying to install a new package can remove previously installed packages if the installation of the new package fails. I think this behaviour is very unintuitive.
Example:
The installation failed because I was missing some library so I installed the missing library and ran
opam install conf-gnutls
again but didn't think about reinstalling ocamlnet too.The text was updated successfully, but these errors were encountered: