Skip to content

feat: structured hints for unsatisfiable conflicts#234

Open
baszalmstra wants to merge 1 commit into
prefix-dev:mainfrom
baszalmstra:feat/conflict-hints
Open

feat: structured hints for unsatisfiable conflicts#234
baszalmstra wants to merge 1 commit into
prefix-dev:mainfrom
baszalmstra:feat/conflict-hints

Conversation

@baszalmstra
Copy link
Copy Markdown
Contributor

When a solve fails, resolvo can render a human readable explanation, but it offers nothing a program can act on. That makes it hard to build helpful tooling on top, such as suggesting a fix for a misspelled package name or pointing out that a package is not available for the current platform.

This adds a way to get the causes of a conflict as structured data, next to the existing rendered message. Each hint describes a single cause: an unavailable package, a version that does not match, candidates that were all excluded, incompatible requests, an unfulfillable constraint, or a lock. The existing error message is unchanged.

Tested with snapshots covering each kind of hint.

Add Conflict::hints, which returns machine-actionable explanations of why
a solve failed alongside the existing rendered error message. Each hint
describes a single cause, such as an unavailable package, a version that
does not match, candidates that were all excluded, incompatible requests,
an unfulfillable constraint, or a lock.
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