Closed StefansM closed 1 year ago
Hi there, thank you for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.
If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment.
Thanks!
It is not possible to use a Jinja2
for
loop in theoutputs
section ofmeta.yaml
due to an incompatibility between rendered and unrendered output.Actual Behavior
This can be reproduced using this minimal example:
Running
conda build .
, I get the following error:The issue seems to be is because of the discrepancy in the number of rendered and "unrendered" outputs. The rendered outputs are parsed from the YAML after applying templates, but the "unrendered" outputs are found via regular expression matching, which obviously won't find outputs added by Jinja2.
Expected Behavior
I don't understand why
conda build
cares about the "unrendered" YAML. Requiring the unrendered YAML to rigidly map to the rendered YAML throws away a lot of the useful features of Jinja2. In general, parsing a YAML file with regexes ignores lots of features of YAML: theoutput_re
inmetadata.py
wouldn't cope with flow-style outputs or YAML anchors (see #2809 for another example of regex parsing).Steps to Reproduce
Run
conda build .
with the minimalmeta.yaml
file above.Output of conda info