Skip to content

[mustache_template] Adopt code-excerpts for README - #40

Open
danielleon-cmd wants to merge 1 commit into
flutter:mainfrom
danielleon-cmd:fpoctsmp-8-mustache-template-readme-excerpts
Open

[mustache_template] Adopt code-excerpts for README#40
danielleon-cmd wants to merge 1 commit into
flutter:mainfrom
danielleon-cmd:fpoctsmp-8-mustache-template-readme-excerpts

Conversation

@danielleon-cmd

Copy link
Copy Markdown

Replaces the hand-written Dart snippets in mustache_template's README with <?code-excerpt?> pragmas backed by a new example/lib/readme_excerpts.dart, so every snippet is validated against compilable, analyzed source instead of free-hand text (dart pub global run flutter_plugin_tools update-excerpts / validate both pass clean).

This surfaced two pre-existing doc bugs:

  • Template('{{# foo }}') in the first lambda example had no closing tag, so it threw a parse error the moment it was actually executed.
  • The two <b>PUB</b> lambda examples were an exact copy-pasted duplicate; the duplicate is removed.

Also removes ci_config.yaml, whose only purpose was opting the package out of excerpt validation (see #102679-style TODO in the file) — no longer needed now that the README is excerpt-backed.

Note on overlap: flutter/flutter#183936 already has two other open PRs addressing it — #23 and #36. This PR was written independently and additionally removes the ci_config.yaml exemption, which neither of those does. Happy to have maintainers close this in favor of one of those if that's preferred; flagging here so reviewer time isn't wasted on duplicate review.

Fixes flutter/flutter#183936

Pre-Review Checklist

This PR only touches the README, CHANGELOG, an example app, and a CI opt-out file — no package source changed, so it falls under the documentation/example test exemption. The new example/lib/readme_excerpts.dart is exercised directly (dart run) as part of verifying this change, and every existing test in the package (dart test, 252 tests) still passes.

FPOCTSMP-8

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

Replaces the hand-written Dart snippets in the README with
<?code-excerpt?> pragmas backed by example/lib/readme_excerpts.dart,
so they're validated against compilable, analyzed source instead of
free-hand text. This surfaced two pre-existing doc bugs: an
incomplete-tag Template literal that threw at parse time, and a
lambda example block that was an exact copy-paste duplicate of the
one before it (now removed).

Also drops the package's ci_config.yaml, whose only purpose was
opting it out of that validation.

Fixes flutter/flutter#183936

FPOCTSMP-8
@danielleon-cmd
danielleon-cmd force-pushed the fpoctsmp-8-mustache-template-readme-excerpts branch from 560787a to f94effd Compare August 31, 2026 17:31
@danielleon-cmd
danielleon-cmd marked this pull request as ready for review August 31, 2026 17:33

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adopts "code-excerpt" for the "mustache_template" package's README Dart snippets. It extracts the inline code snippets from "README.md" into a new compilable example file "readme_excerpts.dart" under a new "example" package, references them in the README using code-excerpt tags, removes the "exempt_from_excerpts" CI opt-out, and bumps the package version to 2.0.6. There are no review comments, so I have no feedback to provide.

@stuartmorgan-g
stuartmorgan-g self-requested a review September 1, 2026 20:23
@flutter flutter deleted a comment from google-cla Bot Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mustache_template] No example app

1 participant