Skip to content

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

Closed
DaNiELChIoRo wants to merge 1 commit into
flutter:mainfrom
DaNiELChIoRo:fpoctsmp-8-mustache-template-readme-excerpts
Closed

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

Conversation

@DaNiELChIoRo

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
@google-cla

google-cla Bot commented Aug 31, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@DaNiELChIoRo

Copy link
Copy Markdown
Author

Closing in favor of #40, opened from a different identity.

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