Skip to content

Better legacy handling and improved error reporting#4

Merged
rartino merged 2 commits intomainfrom
develop
Mar 26, 2026
Merged

Better legacy handling and improved error reporting#4
rartino merged 2 commits intomainfrom
develop

Conversation

@rartino
Copy link
Copy Markdown
Member

@rartino rartino commented Mar 26, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 26, 2026 23:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves publish-time diagnostics by surfacing function-injection problems as warnings and attempts to add legacy-compatible fragment template resolution for Jinja templates.

Changes:

  • Add warnings to PageResult and propagate function-injection warnings from SiteEngine.render() into publish output.
  • Extend publish_site() to aggregate per-page render warnings into the returned PublishReport.
  • Update Jinja fragment rendering to use a new fragment-specific template resolver with “legacy” suffix probing; add tests asserting expected warnings.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_publish_warnings.py Adds tests that assert publish reports warnings for unmet query constraints and missing fragment templates.
src/httk/web/templating/jinja2_engine.py Switches fragment rendering to a new resolver intended to improve legacy suffix handling.
src/httk/web/publishing/static.py Aggregates PageResult.warnings into PublishReport.warnings during publish.
src/httk/web/model/page.py Adds warnings field to PageResult.
src/httk/web/engine/site_engine.py Collects warnings during function injection and returns them on PageResult.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/httk/web/templating/jinja2_engine.py Outdated
Comment thread src/httk/web/templating/jinja2_engine.py Outdated
…gment_template() now reuses TEMPLATE_SUFFIXES instead of a separate hardcoded list
@rartino rartino merged commit 4e2aacb into main Mar 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants