Closed beckermr closed 2 months ago
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.24.*
. However this worked before @h-vetinari, it was apparently not the exact same edge case or something.
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 https://github.com/conda-forge/conda-smithy/issues/2012
cc @h-vetinari