rattler icon indicating copy to clipboard operation
rattler copied to clipboard

Make the `MatchSpec.channel` a `NamedChannelOrUrl`

Open ruben-arts opened this issue 1 year ago • 2 comments

Currently the channel is a full Channel object which contains the configuration for the base url. E.g. conda-forge gets interpreted by default as https://conda.anaconda.org/conda-forge.

This configuration shouldn't matter for a match spec but only while solving. After that, the channel is available on the package record.

I propose to move to the NamedChannelOrUrl type which allows for evaluation of the channel configuration after the parsing is done. This would simplify parsing and avoid miss interpretation of a channel before the configuration is set correctly.

ruben-arts avatar Jul 25 '24 14:07 ruben-arts

The downside is that you would then need a ChannelConfig when calling matches..

baszalmstra avatar Jul 25 '24 14:07 baszalmstra

What about having a RenderedMatchspec that contains this "full" channel. Where you would need to do the conversion.

Also I think you could still match a NamedChannelOrUrl on a Channel based on the info you have.

ruben-arts avatar Jul 25 '24 15:07 ruben-arts