-
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.3 wants to recompile a lot of packages upon removal of an unused package #5506
Comments
For the moment, it is not possible to not trigger recompile on upstream changes. In your case, dune.3.6.1 changed its opam file ( |
That's sadly expected with opam < 2.2 (fixed in #5118). opam 2.2 is hopefully coming in the next few weeks (see https://github.com/ocaml/opam/projects/2#column-19255146) but if you want to try it now you can do it with the following commands:
However for your docker setup I'm not sure there is anything easy to use at the moment aside from using archive pins as @rjbou suggested. |
Thanks a lot for your answers! It's very good to see that a proper solution is on the horizon. To get our CI working again, I needed a workaround now, so I ended up creating a custom Docker image that bakes everything in. The "rebuild everything" behavior still happens, but only once during the image build. The downside is that we now need to maintain yet another image (and that the image is needlessly large due to recompiling everything). Once OPAM 2.2 has made its way into the Debian base images, maybe we can reconsider. Thanks for your work on opam! :-) |
When uninstalling a package,
opam
proceeds to recompile massive parts of the current switch, which is very counterintuitive. This suddenly started happening to us inmathcomp
Docker images used for CI, which brought the CI infrastructure to a crawl and ultimately down.How to reproduce:
I would expect this to just remove the library. Instead, we get:
(Note: we need the
opam update
because we also want to install a couple of packages afterwards.)I guess this is triggered by the
dune
package somehow?Note this happens despite
dune
being pinned to the current version:Config report, as requested:
I need
opam
to not recompile everything inmathcomp
Docker images despite everything being pinned. How can I stop it from triggering the recompilation?The text was updated successfully, but these errors were encountered: