djc / askama

Type-safe, compiled Jinja-like templates for Rust
Apache License 2.0
3.35k stars 215 forks source link

Fix cyclic dependency #1005

Closed GuillaumeGomez closed 4 months ago

GuillaumeGomez commented 4 months ago

Fixes #1004.

We forgot to check a corner-case apparently.

and-reas-se commented 4 months ago

I looked at the PR noticed that both tests appear to test the same thing. Did you mean to have one of the test templates extend the other?

GuillaumeGomez commented 4 months ago

They don't test the same things. One is the case that was already handled ("cyclic1.html" extending itself) and the other checks the case your discovered ("cyclic2.html" extending "cyclic1.html").

and-reas-se commented 4 months ago

In the PR that does not appear to be the case, cycle1.html extends cycle1.html, and cycle2.html extends cycle2.html.

GuillaumeGomez commented 4 months ago

... I'm ashamed. Thanks for the catch! Want to send a PR to update cyclic2.html?

and-reas-se commented 4 months ago

Sure, I can do that.

GuillaumeGomez commented 4 months ago

Awesome! To update UI test, you can do: TRYBUILD=overwrite cargo test.