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:
foo
foo[extras]
foo
-related assignments find the direct-origin package#5770 fixed this by finding the
foo
assignment 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
foo
andfoo[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 thefoo
assignment 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
foo
package is the only one that we ever see; and, per the new testcase, unbreaks #6054