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 stuck resolution #61

Closed
wants to merge 17 commits into from
Closed

Fix stuck resolution #61

wants to merge 17 commits into from

Conversation

uranusjr
Copy link
Member

Eventually fix pypa/pip#9011. Currently only a test case that does not pass.

The whole backtrack() function is picked apart and put together again. I
think this finally makes 100% sense to me, my previous implementation
was such a flux.

Every round of resolution is now a process of

1. Inheriting criteria from the prvious state
2. Create a new pin

When backtracking, the state to backtrack into not only inherits
criteria from the "parent" state, but also receives additional
incompatibility information from the "child" state that discovered them.
So when we backtrack into it, the state's criteria should be modified
in-place so subsequence backtracking into it would also know about those
incompatibilities.

Also (this is the part I got wrong), since the state being backtracked
into does not produce a valid pin after the backtracking process (its
previous pin is now considered an incompatibility), we SHOULD NOT push a
new state; the next round should work on producing a pin on that state.
@uranusjr uranusjr marked this pull request as ready for review November 20, 2020 03:54
@uranusjr uranusjr marked this pull request as draft November 20, 2020 04:05
@uranusjr
Copy link
Member Author

Closing in favour of #62, which is basically the same thing, but with cleaner implementation (IMO) and better commits.

@uranusjr uranusjr closed this Nov 27, 2020
@uranusjr uranusjr deleted the cheroot-testcase branch November 27, 2020 16:12
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.

Pip 20.2.4 goes into infinite resolution of dependencies
1 participant