Skip to content

Improve jinja template error handling in metadata.py - #5985

Open
milahu wants to merge 1 commit into
conda:mainfrom
milahu:patch-1
Open

Improve jinja template error handling in metadata.py#5985
milahu wants to merge 1 commit into
conda:mainfrom
milahu:patch-1

Conversation

@milahu

@milahu milahu commented May 21, 2026

Copy link
Copy Markdown

Enhance error reporting for jinja template rendering failures by including the line number and context of the error.

example

before

Error: Failed to render jinja template in /home/user/src/milahu/conda-recipes/recipes/miniupnpc/meta.yaml:
unexpected '}'

after

Error: Failed to render jinja template in /home/user/src/milahu/conda-recipes/recipes/miniupnpc/meta.yaml:
TemplateSyntaxError: unexpected '}' in line 44
41:     mv -v $PREFIX/bin/upnpc-shared $PREFIX/bin/upnpc
42:     mv -v $PREFIX/bin/upnp-listdevices-shared $PREFIX/bin/upnp-listdevices
43:     rm -v $PREFIX/bin/external-ip.sh
44:     {% endif }
45: 
46: requirements:
47:   build:

Description

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot

Copy link
Copy Markdown
Contributor

We require contributors to sign our Contributor License Agreement and we don't have one on file for @milahu.

In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature, merge the PR (conda/infrastructure#1340), and ping the bot to refresh the PR.

by including the line number and context of the error
@travishathaway

Copy link
Copy Markdown
Contributor

@conda-bot check

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 29, 2026
@travishathaway

Copy link
Copy Markdown
Contributor

Hi @milahu,

We appreciate you taking the effort to submit a pull request, but I just want to let you know that this is unlikely to be merged in its current shape. If you'd like to find another issue to work on, I'd recommend joining our chat over at Zulip and maybe swinging by the #build-tools channel to see what folks are working on and need help with.

@milahu

milahu commented May 29, 2026

Copy link
Copy Markdown
Author

this is unlikely to be merged in its current shape

what is wrong with the current shape?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

3 participants