[mustache_template] Adopt code-excerpts for README - #40
Open
danielleon-cmd wants to merge 1 commit into
Open
Conversation
11 tasks
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
force-pushed
the
fpoctsmp-8-mustache-template-readme-excerpts
branch
from
August 31, 2026 17:31
560787a to
f94effd
Compare
danielleon-cmd
marked this pull request as ready for review
August 31, 2026 17:33
There was a problem hiding this comment.
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
self-requested a review
September 1, 2026 20:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the hand-written Dart snippets in
mustache_template's README with<?code-excerpt?>pragmas backed by a newexample/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/validateboth 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.<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.yamlexemption, 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
[vector_math]///).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.dartis 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
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