twig.js
twig.js copied to clipboard
Fix #708 - Allow multiple includes of a template that embeds another …
Multiple template includes that embed other template breaks the compilation.
This PR is basically @JamesB797 's fix.
Issue: https://github.com/twigjs/twig.js/issues/708
I can confirm this fixes my issues with the file.includes errors :+1:
Me too! It's working on some client projects (as a patch)
Can also confirm this solved the issue on my projects (as a patch).
Any chance we can get this merged? The patch is working for me and is pretty key for us - thanks in advance!
This still needs to be reviewed fully. However, after a cursory review, there is a good chance it will not get merged since it does not include tests and does not seem to address the actual underlying issues. The reported issue #708 is marked as high priority though and I was able to triage the actual issue, so it will most likely be put on the next milestone.
This PR will be left open for now, for reference at the very least, but may be superseded by another PR if the fix in this one proves insufficient.
Tested, and worked, does need test implementation however. Thanks for the thoughts, @willrowe
I took a closer look at this and think I have gotten to the bottom of what is happening. I should have some test cases ready for this soon.
Wooo! Nice work debugging 👍 Some initial insight?
The issue is definitely with the template id
, the last thing I need to take a look at is why that is affecting it in this way to be sure that nothing else breaks when fixing it.
Closing this in favor of #828 since that prevents any conflicts by avoiding storing the template instance in the registry at all.