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

Backjumping failures #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

notatallshaw
Copy link
Contributor

@notatallshaw notatallshaw commented Jun 17, 2024

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".

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.

None yet

1 participant