Skip to content
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

Fix bug with Cudf pre-processing leading to some packages unnecessarily removed #4627

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

AltGr
Copy link
Member

@AltGr AltGr commented Apr 6, 2021

Closes #4624

The issue was that, after pre-processing, we were only considering the
dependency cone of required packages, plus already installed packages.

It happens this wasn't enough, because reverse dependencies may need to be
upgraded: in this case, we wouldn't see the new version, and so just remove
the package.

However, once you do that, these newly included package versions may need to
bring in new dependencies; we could just add their full depdendencies to the
set of packages we need to consider, but that would end up severely reducing
the scope of the trimming;

so, going further, we split the computation of dependencies into strict
requirements, on the requested packages, bringing constraints that can always
be enforced ; and simple dependencies, computed for all other packages that
need to be considered.

For example, if requiring A, where A.1 depends on X>3 but A.2 doesn't, X won't
be a strong requirement of the request, hence installed reverse dependencies
of A could bring in lower versions of X.

This patch also automatically enables "simple" trimming for maximisation
requests, because the simplified trimming won't remove any coinstallable
packages.

…ly removed

Closes ocaml#4624

The issue was that, after pre-processing, we were only considering the
dependency cone of required packages, plus already installed packages.

It happens this wasn't enough, because reverse dependencies may need to be
upgraded: in this case, we wouldn't see the new version, and so just remove the
package.

However, once you do that, these newly included package versions may need to
bring in new dependencies; we could just add their full depdendencies to the set
of packages we need to consider, but that would end up severely reducing the
scope of the trimming;

so, going further, we split the computation of dependencies into strict
requirements, on the requested packages, bringing constraints that can always be
enforced ; and simple dependencies, computed for all other packages that need to
be considered.

For example, if requiring A, where A.1 depends on X>3 but A.2 doesn't, X won't
be a strong requirement of the request, hence installed reverse dependencies of
A could bring in lower versions of X.

This patch also automatically enables "simple" trimming for maximisation
requests, because the simplified trimming won't remove any coinstallable
packages.
Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rjbou rjbou merged commit 8977e43 into ocaml:master Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.1.0~beta4: solver confusion
2 participants