Skip to content

docs: rework the @include TIP to present both fragment-composition styles - #24

Merged
mpyw merged 1 commit into
mainfrom
docs/include-two-styles
Aug 18, 2026
Merged

docs: rework the @include TIP to present both fragment-composition styles#24
mpyw merged 1 commit into
mainfrom
docs/include-two-styles

Conversation

@mpyw

@mpyw mpyw commented Aug 18, 2026

Copy link
Copy Markdown
Owner

The TIP added in #23 was too strict: it claimed the including template must never own the connecting and, arguing from the un-expanded template's raw-paste validity. But an @include-containing template is an authoring artifact — Expand produces the two-way SQL — so requiring the un-expanded form to run raw was not a real constraint.

This replaces it with a TIP that presents both valid styles:

  • (a) the fragment owns the leading and, and the un-expanded template is itself runnable (where 1 = 1 /*%! @include */);
  • (b) the fragment is self-contained (its own 1 = 1 anchor) and the including template owns the and (where 1 = 1 and /*%! @include */), valid after Expand.

Both build to valid SQL; the author picks based on whether the un-expanded template should also run verbatim.

🤖 Generated with Claude Code

…yles

The previous TIP claimed the including template must never own the connecting
`and`, arguing from the un-expanded template's raw-paste validity. But an
@include-containing template is an authoring artifact; Expand produces the
two-way SQL, so requiring the un-expanded form to run raw was too strict.

Replace it with a TIP that presents both valid styles — (a) the fragment owns
the leading `and` and the un-expanded template is itself runnable; (b) the
fragment is self-contained with its own `1 = 1` anchor and the including
template owns the `and`, valid after Expand — and lets the author choose.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAydPGeSHjZvJv22oz4P6d
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.52%. Comparing base (f47b2b9) to head (22e4571).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #24   +/-   ##
=======================================
  Coverage   96.52%   96.52%           
=======================================
  Files          11       11           
  Lines         951      951           
=======================================
  Hits          918      918           
  Misses         21       21           
  Partials       12       12           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpyw
mpyw merged commit 388b7a5 into main Aug 18, 2026
4 checks passed
@mpyw
mpyw deleted the docs/include-two-styles branch August 19, 2026 06:49
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.

1 participant