-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Re-rendering with conditionally defined Jinja variables fails under conda-build 24.7 #2011
Comments
Looks like this would be addressed in upstream PR: conda/conda-build#5458 |
This was fixed with Michael's upstream PR ( conda/conda-build#5458 ), which was included in Closing as resolved |
I'm still seeing this in a couple of cases with conda/conda-build@5f66f2b. For example,
when trying to render |
This also accounts for at least one failure in the Python 3.13 migration:
in iris, which I believe is conda/conda-build#5424 |
Recently have encountered the following bug when re-rendering with conda-smithy depending on the conda-build version used. This is very likely is a conda-build bug. However conda-build itself does not encounter the issue when building recipes. So it could be how conda-smithy and conda-build interact, which causes the issue
The core of the bug is involves Jinja variables that are conditionally defined (meaning there are cases where they are
undefined
). Previously if a Jinja variable would beundefined
for a certain condition (like an OS), this was not an issue if that condition wasskip
ped. However now the conditionally defined variable is a problem even in case where it is never usedTake this recipe (a boiled down example to show the core bug),
version
here is conditionally defined. It will only be defined onlinux
. Otherwiseversion
isundefined
. Previously the top-levelskip
, which limited the build tolinux
, would have been sufficient to ensureversion
was defined for the relevant condition. So theversion
would have been defined anywhere this recipe would buildAlso when re-rendering this recipe using
conda-build
version24.5
, this would work ok. However starting withconda-build
version24.7
, the following recipe fails to re-renderTo workaround this with
conda-build
version24.7
, it seems one needs to do one of the following:version
definitions for other conditions until it passes (soosx
,win
, etc.)version
: Adding this to line 2{% set version = version|default("") %}
version
(shown above)Ideally none of this would be needed. However it appears something has changed about how conda-build renders recipes and where conda-smithy interacts with that rendering functionality. As a result this now produces errors for conditions the recipe cannot actually be built for anyways (because of the
skip
)Edit - Also surfaced this upstream: conda/conda#13995 (comment)
The text was updated successfully, but these errors were encountered: