Skip to content

fix: normalize channel names to canonical URLs using ChannelConfig#2295

Draft
ritankarsaha wants to merge 1 commit intoconda:mainfrom
ritankarsaha:fix/solver-channel-normalization
Draft

fix: normalize channel names to canonical URLs using ChannelConfig#2295
ritankarsaha wants to merge 1 commit intoconda:mainfrom
ritankarsaha:fix/solver-channel-normalization

Conversation

@ritankarsaha
Copy link
Copy Markdown
Contributor

Description

Adds a channel_config: ChannelConfig field to SolverTask (defaulting to the standard conda.anaconda.org alias for backward compatibility) and threads it through to CondaDependencyProvider::new.

The TODO block that previously just collected channel-pinned specs is replaced by apre-computation step that maps each spec to its canonical channel URL, re-expanding short names through the caller-provided config. During per-record filtering, record.channel is likewise normalized through the same config before comparison. This ensures that a spec like my-channel::numpy correctly matches or rejects records regardless of which channel alias was active when the MatchSpec was parsed.

Fixes #2294

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.

@baszalmstra

@ritankarsaha ritankarsaha force-pushed the fix/solver-channel-normalization branch from 716bb62 to 74fc431 Compare March 28, 2026 04:48
@ritankarsaha ritankarsaha marked this pull request as draft March 28, 2026 05:03
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.

Channel names not normalized to URLs in the solver, channel-pinned specs silently match wrong packages

1 participant