You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~/conda/lib/python3.11/site-packages/conda_recipe_manager/parser/recipe_reader.py:480, in RecipeReader.__init__(self, content)
478 depth_to_pop = (cur_indent - new_indent) // TAB_SPACE_COUNT
479 for _ in range(depth_to_pop):
--> 480 node_stack.pop()
481 cur_indent = new_indent
482 # Look at the stack to determine the parent Node and then append the current node to the new parent.
IndexError: pop from empty list
The text was updated successfully, but these errors were encountered:
I have known about this for a while, I just have never written it down publicly. So thanks for creating this issue! JINJA conditionals and for loops are not currently supported.
The integration test data set indicates that these JINJA template constructs are not commonly used. I'm not sure when we will find time to address this given the limited number of recipes that utilize that feature set. It is a fairly large ask, especially if we are all moving to the V1 recipe format.
If you are looking to use this library in conda-smithy, I would suggest a dual method approach as a stop-gap. If the parser fails to parse something, fall back to a known/existing approach.
What happened?
cannot parse recipe with jinja conditional branches, meaning it cannot be used for
conda-smithy recipe-lint
on conda-forge.To Reproduce
Sample recipe:
gives:
The text was updated successfully, but these errors were encountered: