Template compilation infinite loop / failed cycle detection
and-reas-se opened this issue · comments
Andreas commented
Hello,
I ran into the same bug as is reported is issue #515. That issue was closed as solved in 2021, with some cycle detection added in, but I have a simple case the cycle detection fails to trigger on.
The following project will reproduce it, running cargo build never halts.
src/lib.rs
:
use askama::Template;
#[derive(Template)]
#[template(path = "page.html")]
pub struct Page;
templates/base.html
:
{% extends base.html %}
templates/page.html
:
{% extends base.html %}
Guillaume Gomez commented
Is page.html
necessary to trigger it?
Andreas commented
Yes, if you do path = "base.html"
in lib.rs the cycle detection triggers properly.
Guillaume Gomez commented
Interesting. Checking what's going on.
Guillaume Gomez commented
Opened #1005. Thanks for the detailed issue! :)