Skip to content

Comments

Consolidate the disjoint target hints#17540

Merged
zanieb merged 2 commits intoastral-sh:mainfrom
zaniebot:claude/separate-disjoint-target-hint-GzPck
Jan 19, 2026
Merged

Consolidate the disjoint target hints#17540
zanieb merged 2 commits intoastral-sh:mainfrom
zaniebot:claude/separate-disjoint-target-hint-GzPck

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Jan 16, 2026

These should be generated alongside all the other resolver hints, I think.

The order changes here, but that seems fine.

Move the disjoint target hint logic from a separate method on
NoSolutionError (hint_disjoint_targets) into the centralized
generate_hints() method on PubGrubReportFormatter for consistency.

Changes:
- Add DisjointPythonVersion and DisjointEnvironment variants to PubGrubHint
- Add current_environment parameter to generate_hints()
- Move disjoint target check logic into generate_hints()
- Remove hint_disjoint_targets method from NoSolutionError
- Clean up unused imports in error.rs
@zanieb zanieb added the internal A refactor or improvement that is not user-facing label Jan 16, 2026
The disjoint target hints now appear first in the hint list because
they're generated at the start of generate_hints() instead of being
added separately at the end.
@zanieb zanieb marked this pull request as ready for review January 16, 2026 20:35
@zanieb zanieb requested a review from konstin January 16, 2026 20:48
@zanieb zanieb mentioned this pull request Jan 17, 2026
@zanieb zanieb merged commit ed3cd39 into astral-sh:main Jan 19, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants