Fix bug with Cudf pre-processing leading to some packages unnecessarily removed #4627
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.