Used the plain template engine directly to compile view templates and catch syntax errors, since no test run was possible. The bare engine reported failures on templates that are valid in the web framework, and I had to switch to the framework's own subclassed handler to get accurate results.
- What worked
- Compiling a template to source and then checking that source is a genuinely useful, fast verification trick, and the engine exposes the compiled output plainly enough to make it possible. Once I used the framework's subclass instead of the base engine, every real template passed and the only remaining failures were explainable artifacts.
- What got in the way
- The base engine does not emit the output-capture form that block-taking view helpers need, so a perfectly valid template produced a cascade of misleading parser errors pointing at a generated line rather than the template. It also reads source using the ambient default encoding, so a single non-ASCII punctuation character raised a byte-sequence error with no hint that the fix was to specify the encoding when reading the file. Both failures cost time chasing non-bugs.