revert #5770, provide new fix#6058
Merged
radoering merged 3 commits intopython-poetry:masterfrom Jul 31, 2022
Merged
Conversation
dbfeb4c to
722fe6a
Compare
radoering
reviewed
Jul 31, 2022
Member
radoering
left a comment
There was a problem hiding this comment.
I agree that resolving direct origin dependencies first seems to be sensible. I just noticed a minor inconsistency (see comment below).
Co-authored-by: Randy Döring <[email protected]>
Member
|
I just added some dedicated tests for |
radoering
approved these changes
Jul 31, 2022
efugier
pushed a commit
to efugier/poetry
that referenced
this pull request
Aug 4, 2022
Co-authored-by: Randy Döring <[email protected]>
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull Request Check List
Resolves: #6054
I think that the fix made at #5770 was not good. (I did review it at the time without seeing problems, so no blame!)
As I now understand it, the problem that it was trying to solve was:
foofoo[extras]foo-related assignments find the direct-origin package#5770 fixed this by finding the
fooassignment at the second bullet, and then the intersection of a direct-origin and not-direct-origin term always favours the direct-origin.I think this is probably unreliable: eg in the first bullet we might have registered a direct-origin assignment for
foo[other-extras]. Or bullets 1 and 2 might happen the other way round.Apart from that, #6054 exposed a problem where we registered regular assignments for
fooandfoo[extras], but with incompatible version ranges. Before #5770 that was fine and is unwound later in the search, but after #5770 we try to update thefooassignment and go wrong.This MR undoes the fix of #5770 and tries another. I have arranged that:
That fixes the original #5311 because now the direct-origin version of the
foopackage is the only one that we ever see; and, per the new testcase, unbreaks #6054