-
Notifications
You must be signed in to change notification settings - Fork 425
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
variants not rendered properly w/ jinja2 if statements and skips #5445
Labels
type::bug
describes erroneous operation, use severity::* to classify the type
Milestone
Comments
beckermr
added
the
type::bug
describes erroneous operation, use severity::* to classify the type
label
Aug 6, 2024
If I remove the output and use a simple recipe like this: {% if CLANG_VERSION is not defined %}
{% set CLANG_VERSION = "16.0.6" %}
{% set CL_VERSION = "19.29" %}
{% set VCVER = "" %}
{% endif %}
{% set clang_major = CLANG_VERSION.split(".")[0] %}
{% set cl_minor = CL_VERSION.split(".")[1] %}
{% set vc_major = VCVER.split(".")[0] %}
package:
name: clang-win-activation
version: {{ CLANG_VERSION }}
build:
number: 0
{% if clang_major|int == 16 and cl_minor|int >= 40 %}
skip: true
{% endif %}
run_exports:
strong:
- vc >={{ VCVER }}
requirements:
run:
- clang {{ CLANG_VERSION }}.* the bug appears to go away. |
Moving the skip to the output also works fine: {% if CLANG_VERSION is not defined %}
{% set CLANG_VERSION = "16.0.6" %}
{% set CL_VERSION = "19.29" %}
{% set VCVER = "" %}
{% endif %}
{% set clang_major = CLANG_VERSION.split(".")[0] %}
{% set cl_minor = CL_VERSION.split(".")[1] %}
{% set vc_major = VCVER.split(".")[0] %}
package:
name: clang-win-activation
version: {{ CLANG_VERSION }}
build:
number: 0
outputs:
- name: clang_win-64
build:
{% if clang_major|int == 16 and cl_minor|int >= 40 %}
skip: true
{% endif %}
run_exports:
strong:
- vc >={{ VCVER }}
requirements:
run:
- clang {{ CLANG_VERSION }}.* |
An explicit skip via a selector works OK too: {% if CLANG_VERSION is not defined %}
{% set CLANG_VERSION = "16.0.6" %}
{% set CL_VERSION = "19.29" %}
{% set VCVER = "" %}
{% endif %}
{% set clang_major = CLANG_VERSION.split(".")[0] %}
{% set cl_minor = CL_VERSION.split(".")[1] %}
{% set vc_major = VCVER.split(".")[0] %}
package:
name: clang-win-activation
version: {{ CLANG_VERSION }}
build:
number: 0
skip: true # [CLANG_VERSION == "16.0.6" and CL_VERSION == "19.40.33808"]
outputs:
- name: clang_win-64
build:
run_exports:
strong:
- vc >={{ VCVER }}
requirements:
run:
- clang {{ CLANG_VERSION }}.* |
This same bug is present all the way back to conda-build |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
What happened?
Using this recipe
and this CBC
I get the following depending on the python hash seed
I would have expected all of the version
19.*
,18.*
and17.*
variants with only one of the version16.*
variants.Conda Info
Conda Config
Conda list
Additional Context
xref conda-forge/conda-smithy#2012
cc @h-vetinari
The text was updated successfully, but these errors were encountered: