solver: fix KeyError due to orphan decisions - root cause - #11009
Draft
radoering wants to merge 3 commits into
Draft
solver: fix KeyError due to orphan decisions - root cause#11009radoering wants to merge 3 commits into
radoering wants to merge 3 commits into
Conversation
This only fixes the symptom (in some cases - see xfail test) but not the root cause.
To avoid orphan decisions we have to exclude local versions from the dependency constraint of the first term of the incompatibility. Since we have no means to express such a constraint, we determine all available local version and build the difference of the public version with them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Alternative to #11008 that fixes the root cause instead of the symptom - however too slow (and more risky).
To avoid orphan decisions we have to exclude local versions from the dependency constraint of the first term of the incompatibility. Since we have no means to express such a constraint, we determine all available local versions and build the difference of the public version with them.
This solution has a notable performance issue - it queries the index for all (local) versions of each chosen package version. Actually, we would need a constraint to exclude all local versions to build the term of the incompatibility (similar to arbitrary equality
===). I gave this a quick try, but this resulted in a hanging resolver - either due to bugs in my arbitrary equality implementation or because the solver is not prepared for arbitrary equality - I did not investigate further.Pull Request Check List
Resolves: #10965