getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
13.56k stars 946 forks source link

Zola should detect cyclic extends with a clean message #2506

Open gl-yziquel opened 4 months ago

gl-yziquel commented 4 months ago

Bug Report

I made a page.html template with only that inside:

{% extends "page.html" %}

page.html instead of base.html. My bad. This triggers a stack overflow (rather expectedly...)

Environment

Zola version: Built from git HEAD. 0.18.0

Expected Behavior

Tell us what should have happened: a nicer error message, isolating the cyclic dependency. Would avoid hunting cyclic dependencies down.

Current Behavior

Tell us what happens instead of the expected behavior: stack overflow.

Keats commented 4 months ago

It's already fixed in the upcoming version of the template engine (upcoming, but don't know when exactly).