Skip to content

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Feb 4, 2025

Description

Update the section describing the context block to permit lists of scalars in addition to scalars. Add a note that the resulting Jinja variable will have the same type as the value. For example, this can be used to declare lists of skipped tests, conveniently interspersing them with comments, and afterwards combining into a single string.

The change is backwards compatible and minimal, so it seems cleanest to update the specification in place rather than via another CEP.

See also: prefix-dev/rattler-build#1402

CC @wolfv

mgorny added a commit to mgorny/rattler-build that referenced this pull request Feb 20, 2025
Add support for specifying lists in addition to scalars in `context`.
They are converted to Jinja sequences.  We require that all list members
have the same type.

CEP-14 update: conda/ceps#110
@mgorny mgorny force-pushed the rattler-context-list branch from 27745e3 to 9c03c0a Compare September 12, 2025 13:09
@mgorny
Copy link
Contributor Author

mgorny commented Sep 12, 2025

@wolfv, well, it's been experimental for a while now. How do we proceed from here?

@wolfv
Copy link
Contributor

wolfv commented Sep 16, 2025

I think it's time to call for a vote! :)

@wolfv
Copy link
Contributor

wolfv commented Sep 16, 2025

Although I am unsure whether modifying existing CEPs in this way is "allowed". Let's ask on the conda CEP Zulip channel ...

@isuruf
Copy link
Contributor

isuruf commented Sep 16, 2025

Does this mean we are allowed to do something like

context:
  build_reqs:
    - ${{ compiler('cxx') }}
    - make

recipe:
  name: test
  version: 0.1.0

outputs:
  - package:
      name: foo
    requirements:
      build: ${{ build_reqs }}

  - package:
      name: bar
    requirements:
      build: ${{ build_reqs }}

@wolfv
Copy link
Contributor

wolfv commented Sep 17, 2025

I think this syntax would not work, but a list of list is flattened and that would then work, yes.

@mgorny
Copy link
Contributor Author

mgorny commented Sep 20, 2025

Although I am unsure whether modifying existing CEPs in this way is "allowed". Let's ask on the conda CEP Zulip channel ...

I see the only reply was basically "yes", so should we (you?) start the vote?

@wolfv
Copy link
Contributor

wolfv commented Sep 26, 2025

@mgorny we decided we can just "accept" this. Maybe you can take a look at my latest change to cep-0014 and add a little changelog thing as well? Then we can merge! Thank you & sorry for the long wait :)

Update the section describing the `context` block to permit lists of
scalars in addition to scalars.  Add a note that the resulting Jinja
variable will have the same type as the value.  For example, this
can be used to declare lists of skipped tests, conveniently
interspersing them with comments, and afterwards combining into a single
string.

The change is backwards compatible and minimal, so it seems cleanest
to update the specification in place rather than via another CEP.

See also: prefix-dev/rattler-build#1402

Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
@mgorny mgorny force-pushed the rattler-context-list branch from 9c03c0a to 17edd66 Compare September 26, 2025 15:20
@mgorny
Copy link
Contributor Author

mgorny commented Sep 26, 2025

Rebased and added an entry.

@wolfv wolfv merged commit 2ea585a into conda:main Sep 26, 2025
1 check passed
@mgorny mgorny deleted the rattler-context-list branch October 7, 2025 13:31
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