-
Notifications
You must be signed in to change notification settings - Fork 31
CEP-0014: permit lists in context
#110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
27745e3 to
9c03c0a
Compare
|
@wolfv, well, it's been experimental for a while now. How do we proceed from here? |
|
I think it's time to call for a vote! :) |
|
Although I am unsure whether modifying existing CEPs in this way is "allowed". Let's ask on the conda CEP Zulip channel ... |
|
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 }} |
|
I think this syntax would not work, but a list of list is flattened and that would then work, yes. |
I see the only reply was basically "yes", so should we (you?) start the vote? |
|
@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>
9c03c0a to
17edd66
Compare
|
Rebased and added an entry. |
Description
Update the section describing the
contextblock 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