Skip to content

CEP 44: clarify extras matchspec - #177

Merged
jaimergp merged 11 commits into
conda:mainfrom
wolfv:clarify-cep44-extras-matchspec
Aug 11, 2026
Merged

CEP 44: clarify extras matchspec#177
jaimergp merged 11 commits into
conda:mainfrom
wolfv:clarify-cep44-extras-matchspec

Conversation

@wolfv

@wolfv wolfv commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Checklist for submitter

  • I am submitting a new CEP: Put your title here.
    • I am using the CEP template by creating a copy cep-0000.md named cep-XXXX.md in the root level.
  • I am submitting modifications to CEP 44.
    • The PR title reflects the CEP I'm modifying: CEP XX: Amend XYZ.
    • I updated the "Updated" date.
    • I added the link of this PR to the Discussions row.
    • I added or extended the ## Changelog section right above the final "Copyright" section with an item that uses syntax YYYY-MM-DD: Brief explanation of changes.
  • Something else: (add your description here).

Checklist for CEP approvals

  • The vote period has ended and the vote has passed the necessary quorum and approval thresholds.
  • A new CEP number has been minted. Usually, this is ${greatest-number-in-main} + 1.
  • The cep-XXXX.md file has been renamed accordingly.
  • The # CEP XXXX - header has been edited accordingly.
  • The CEP status in the table has been changed to approved.
  • The last modification date in the table has been updated accordingly.
  • The table in the README has been updated with the new CEP entry.
  • The pre-commit checks are passing.

The Specification only showed the scalar form `pkg[extras="group-name"]`
and described the value as "a string or a list of string" without
pinning down the list syntax, whether the `[a-z0-9_.+-]{1,64}` grammar
binds the selector, or how case is handled. This left implementations to
guess (e.g. quoted-list handling, uppercase names).

Clarify that:
- the list form is a bracketed, comma-separated list, e.g. `[extras=[a, b]]`
- names may be optionally single/double quoted; surrounding whitespace is ignored
- selector names must obey the same group-name grammar as `extra-depends`
  keys, compared case-sensitively with no normalization
- a non-conforming name makes the MatchSpec invalid (must be rejected)
- referencing an absent group name is a no-op, not an error
Comment thread cep-0044.md
Comment thread cep-0044.md Outdated
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
@jaimergp jaimergp changed the title amendment: clarify cep44 extras matchspec CEP 44: clarify extras matchspec Jul 2, 2026
Comment thread cep-0044.md Outdated
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
@jaimergp
jaimergp requested a review from a team July 6, 2026 08:31
@wolfv

wolfv commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @jaimergp for fixing the PR up! Idk if we need a vote or more core people to chime in but IMO this is just a clarification and we could merge it (if we agree that quotes are supported).

@jaimergp

jaimergp commented Jul 6, 2026

Copy link
Copy Markdown
Member

I don't think we need a vote, but I do want more eyes on this because the diff goes beyond "typo fix". I'll mention it in the next community meeting too and it should be ok.

Comment thread cep-0044.md
Comment thread cep-0044.md Outdated
Comment thread cep-0044.md Outdated

- MAY be quoted with balanced single or double quotes; the quotes carry no semantic difference.
- MAY be wrapped with whitespace, which MUST be ignored.
- MUST match the same `[a-z0-9_.+-]{1,64}` grammar as the `extra-depends` keys. A `MatchSpec` whose `extras` value contains a name that does not match this grammar is invalid and MUST be rejected.

@jaimergp jaimergp Jul 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rejects glob strings. Is that intended? I think it's a good idea to not allow them for now (why would I want to install extras=["known-prefix-*"]?). In that case, maybe we should mention that these items MUST be string literals matching that grammar.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah globbing was never discussed for extras (Only for flags).

Comment thread cep-0044.md Outdated
Comment on lines +43 to +45
This new field must be selectable by `MatchSpec` syntax using the `extras` keyword inside square brackets, the value of which MUST be a string or a list of string targeting group names.

Individual names in the list:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This new field must be selectable by `MatchSpec` syntax using the `extras` keyword inside square brackets, the value of which MUST be a string or a list of string targeting group names.
Individual names in the list:
This new field must be selectable by `MatchSpec` syntax using the `extras` keyword inside square brackets, the value of which MUST be a string or a list of string targeting group names. Each of these strings:

(so it applies to both scalar and lists)

Comment thread cep-0044.md
Comment thread cep-0044.md Outdated
Comment on lines +47 to +48
- MAY be quoted with balanced single or double quotes; the quotes carry no semantic difference.
- MAY be wrapped with whitespace, which MUST be ignored.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can go away if we accept the YAML 1.2 suggestion.

Comment thread cep-0044.md Outdated
Comment thread cep-0044.md Outdated
Comment thread cep-0044.md Outdated
@jaimergp
jaimergp merged commit db8ae77 into conda:main Aug 11, 2026
1 check passed
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.

3 participants