Fix an infinite loop in the solver #6178
Merged
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.
I tried bumping crashtest to 0.4.0 in poetry itself. This can't work because cleo requires a lower version than that, but instead of failure I hit an infinite loop.
Turned out there are two separate bugs here, both with the effect that version 1.0.0a5 of cleo is retried even after it has been ruled out because of this incompatibility
first, we go into
_get_locked()
with a constraint that should explicitly rule out 1.0.0a5 ->1.0.0a5,<2.0.0
- but because of the prerelease we decide that 1.0.0a5 is fine after all. So far as I can see the code that I've removed just doesn't want to be there: anyway removing it doesn't break any existing tests and helps this one...then we go into
search_for_installed_packages()
again having started with a constraint that should rule out 1.0.0a5: but in here we pay no attention to that constraint at all. So we again rediscover the already ruled-out version. I've fixed this one by respecting the dependency in that function.