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.
Here are two tests (I may add more) that fail because of backjumping.
None of these tests are fixed by #152 because that is only able to recover the situation if each requirement has remaining unchecked candidates, but backjumping can backtrack to the root requirement, incorrectly, and if, for example, that requirement has only one candidate then there can be an erroneous ResolutionImpossible.
I believe the issue is that backjumping sets up an implicit contract, caused by this, between itself and the provider. That the provider should always prefer direct conflicts over any other candidate. However, resolvelib does not enforce or document this, and the provider can prefer any unsatisfied name, and therefore the algorithm is currently unsound, for example pip does not prefer directly conflicting packages, at least not yet.
@uranusjr @frostming @bennati IMO either backjumping should be reverted, or it should be made opt-in for providers who "know what they are doing".