Skip to content

name the candidate's real requirement in the no-versions diagnostic - #582

Merged
notatallshaw merged 1 commit into
bug/lookahead-blocker-range-reprfrom
bug/lookahead-decision-block-hides-requirement
Aug 5, 2026
Merged

notatallshaw merged 1 commit into
bug/lookahead-blocker-range-reprfrom
bug/lookahead-decision-block-hides-requirement

Conversation

@notatallshaw

@notatallshaw notatallshaw commented Jul 24, 2026 •

Copy link
Copy Markdown
Owner

When every version of a package is rejected because it needs a version of a dependency that conflicts with one the resolver has already decided, the no-versions diagnostic printed requires bar != 1.0. That reads as though any bar other than 1.0 would satisfy the candidate, which points away from the real conflict: the candidate actually needs a specific range (for example bar==2.0) that happens to exclude the decided 1.0.

The range-block and root-block paths already print requires X in <range> but solution has it in <...>. The decision-block path now does the same, reading the declared dep range out of the pending_decision_dep_ranges union the look-ahead already keeps, so it prints requires bar in [2.0, 2.0] but solution has it in [1.0, 1.0].

That accumulator arrived on main with #590 for blocker membership widening. This PR originally added a second one of its own; that half is dropped, and what is left is the diagnostic.

Stacked on #472, so both ranges render through format_range rather than the internal debug repr.

@notatallshaw
notatallshaw changed the base branch from main to bug/lookahead-blocker-range-repr July 27, 2026 11:34
@notatallshaw
notatallshaw force-pushed the bug/lookahead-decision-block-hides-requirement branch 2 times, most recently from 7352682 to 17c66ca Compare July 27, 2026 11:51
@notatallshaw
notatallshaw force-pushed the bug/lookahead-blocker-range-repr branch from cd7f2de to 0d375e4 Compare August 3, 2026 14:07
The decision-block path already unions each rejected candidate's declared dep range for blocker widening. Read that union in the no-versions message so it names the range the candidate needs instead of negating the decided version, matching the range- and root-block paths.
@notatallshaw
notatallshaw force-pushed the bug/lookahead-decision-block-hides-requirement branch from 17c66ca to c9a466d Compare August 3, 2026 14:22
@read-the-docs-community

Copy link
Copy Markdown

@notatallshaw
notatallshaw marked this pull request as ready for review August 5, 2026 03:32
@notatallshaw
notatallshaw merged commit d828bf9 into bug/lookahead-blocker-range-repr Aug 5, 2026
59 checks passed
@notatallshaw
notatallshaw deleted the bug/lookahead-decision-block-hides-requirement branch August 5, 2026 03:32
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.

1 participant