Skip to content

Update repodata and MatchSpec support for conditionals / flags / extras based on latest CEP draft #1790

@danyeaw

Description

@danyeaw

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

Hey All,

This is a request to align Rattler with the proposed CEP for new repodata and MatchSpec features, including:

  1. Conditional dependencies using ; if syntax (e.g., importlib_metadata; if python <3.10)
  2. Flags for variant selection (e.g., pytorch[flags=['gpu:*']])
  3. Enhanced extras support beyond the current extra_depends implementation

Why is this needed?

Rattler already has experimental support via extra_depends, but as the CEP has progressed the syntax has been updated. It would be nice to get the implementation updated in parallel to us getting the CEP over the finish line.

Although this would be a nice update for the conda ecosystem in general, we are also interested in this for the conda CLI for better integration with the PyPI ecosystem. Having support for at least conditional dependencies is a prerequisite to adding wheels to repodata. We discussed more about that in our recent roadmap post.

It would be nice to explore usage of conda-rattler-solver with support for this, and it could potentially become a dependency of conda-pypi if we decide that this is the best approach.

What should happen?

  • Support conditional syntax in depends field parsing
  • Add flags field to PackageRecord
  • Enhance extras support to match CEP model
  • Update solver to evaluate conditional dependencies and handle flags
  • Add MatchSpec support for flag syntax

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions