Skip to content

fix: don't merge conflict nodes with distinct requirements#233

Merged
baszalmstra merged 1 commit into
prefix-dev:mainfrom
baszalmstra:fix/conflict-merge-distinct-requirements
Jun 5, 2026
Merged

fix: don't merge conflict nodes with distinct requirements#233
baszalmstra merged 1 commit into
prefix-dev:mainfrom
baszalmstra:fix/conflict-merge-distinct-requirements

Conversation

@baszalmstra
Copy link
Copy Markdown
Contributor

@baszalmstra baszalmstra commented Jun 3, 2026

When an environment cannot be solved, several versions of a package that depend on different versions of a missing dependency were grouped together and only one of their requirements was shown. This hid the other requirements and made the error misleading.

This change reports each distinct requirement separately, so every version range that cannot be satisfied is visible. This is similar to how micromamba reports the same situation.

This is what conda/rattler#2476 runs into: for r-ggpmisc on emscripten-wasm32 (where r-base has no builds) every version was collapsed into one line showing only an old r-base requirement, even though newer versions need newer r-base.

Result:

a * cannot be installed because there are no viable options:
├─ a 4 would require
│  └─ b >=43, <44, for which no candidates were found.
├─ a 3 would require
│  └─ b >=42, <43, for which no candidates were found.
└─ a 1 | 2 would require
   └─ b >=41, <42, for which no candidates were found.

Tested with a new snapshot covering multiple versions that require different versions of a missing dependency. All existing snapshots are unchanged.

@baszalmstra baszalmstra force-pushed the fix/conflict-merge-distinct-requirements branch from a6291a0 to 3124c1a Compare June 3, 2026 15:01
Versions of a package that require different versions of a missing dependency are no longer collapsed into a single node in the conflict report. Previously only one of those requirements was shown and the rest were hidden, producing a misleading error message.

See conda/rattler#2476.
@baszalmstra baszalmstra merged commit 23565b5 into prefix-dev:main Jun 5, 2026
9 checks passed
@baszalmstra baszalmstra deleted the fix/conflict-merge-distinct-requirements branch June 5, 2026 09:39
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.

2 participants