Closed alessandrothea closed 3 years ago
I wonder if I'm doing something wrong or it's a limitation on Jinjia's side.
No, not you. What you are expecting matches what "should" be happening.
Jinja is blameless as it checks paths as given by the app.
moo
"should" append to the default moo/templates/
path any given by -T
flags. This appending may be "bad" because it means one can not override any template file provided in the default path - but that's a different story maybe for a different issue.
So, something is broken. I'll add a test for this and then a fix.
It was indeed some brokenness in getting the path into Jinja properly. Paths were generally a mess and are now cleaned up.
For easy CLI checking see the moo path
and moo resolve
commands. Examples added:
https://brettviren.github.io/moo/buildsys.html#paths https://brettviren.github.io/moo/buildsys.html#resolve
Hi,
I'm am playing around with templates, trying to get the hang of making new ones, and stumbled upon the following issue: I would like to re-use the jinjia cpp macros provided by moo (
ocpp.hpp.j2
) but I found no way to tell moo/jinjia to look for them inmoo/templates/ocpp.hpp.j2
if the template is not the one provided by moo.For instance
fails because jinjia at
with the message
I was assuming that jinjia would look for it in
moo/templates/ocpp.hpp.j2
but it doesn't seem the casa. Not it seems to take into account the template path(s) passed as CLI arguments. I've made a few tests copyingocpp.hpp.j2
andNljs.hpp.j2
to different directories and adding both to the path, but no joy.I wonder if I'm doing something wrong or it's a limitation on Jinjia's side. Any advice?