Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions cep-0044.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
Jaime Rodríguez-Guerra <jaime.rogue@gmail.com>
</td></tr>
<tr><td> Created </td><td> Feb 5, 2025</td></tr>
<tr><td> Updated </td><td> May 14, 2026</td></tr>
<tr><td> Discussion </td><td> https://github.com/conda/ceps/pull/111, https://github.com/conda/ceps/pull/165 </td></tr>
<tr><td> Updated </td><td> Jul 15, 2026</td></tr>
<tr><td> Discussion </td><td> https://github.com/conda/ceps/pull/111, https://github.com/conda/ceps/pull/165, https://github.com/conda/ceps/pull/181 </td></tr>
<tr><td> Implementation </td><td> NA </td></tr>
</table>

Expand All @@ -32,19 +32,19 @@ Instead of overloading the repodata documents with more package names (which cau

## Rationale

The chosen keyword in CEP 29 `MatchSpec`, keywords is `extras` given its popularity in Python packaging. For CEP 34 `info/index.json` records is `extra-depends` to avoid ambiguity with a hypothetical `extra-constraints`.
The chosen keyword in CEP 29 `MatchSpec`, keywords is `extras` given its popularity in Python packaging. For CEP 34 `info/index.json` records is `extra_depends` to avoid ambiguity with a hypothetical `extra_constraints`.

## Specification

The `info/index.json` dictionary of each conda artifact MUST allow a new field, `extra-depends`, the value of which MUST be a dictionary that maps the group names (expressed as a string that MUST match the regex `[a-z0-9_.+-]{1,64}`) to a list of `MatchSpec` strings encoding the optional dependencies. Since this is backwards incompatible behavior-wise, the `schema_version` value MUST be bumped to `3`.
The `info/index.json` dictionary of each conda artifact MUST allow a new field, `extra_depends`, the value of which MUST be a dictionary that maps the group names (expressed as a string that MUST match the regex `[a-z0-9_.+-]{1,64}`) to a list of `MatchSpec` strings encoding the optional dependencies. Since this is backwards incompatible behavior-wise, the `schema_version` value MUST be bumped to `3`.

The `extras` field MUST also be exposed in recipe formats v1 and above, under the `requirements.extras` section (sibling to `build`, `host`, `run`, etc), that renders to the same schema (`dict[str, list[MatchSpec]]`).

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. If an optional dependency group is matched by the `extras` field in `MatchSpec`, its list of dependencies MUST be unioned with the regular `depends` field and resolved accordingly.

## Examples

A repodata record with `extra-depends`:
A repodata record with `extra_depends`:

```js
{
Expand All @@ -56,7 +56,7 @@ A repodata record with `extra-depends`:
"depends": [
"main-dependency"
]
"extra-depends": {
"extra_depends": {
"group-name": [
"extra-dependency>=2",
"another-dependency>=1"
Expand Down Expand Up @@ -104,4 +104,6 @@ All CEPs are explicitly [CC0 1.0 Universal](https://creativecommons.org/publicdo

## Changelog

- May 29, 2026: Fixed regex for valid extra group names.
- 2026-07-15: Changed `extra-depends` to `extras_depends` for consistency with other undescore-separated field names in `index.json`.
- 2026-05-29: Fixed regex for valid extra group names.
- 2026-05-14: Accepted.