Skip to content

[various] Import from flutter/packages#18

Merged
stuartmorgan-g merged 125 commits into
flutter:mainfrom
stuartmorgan-g:import-from-packages
Jun 9, 2026
Merged

[various] Import from flutter/packages#18
stuartmorgan-g merged 125 commits into
flutter:mainfrom
stuartmorgan-g:import-from-packages

Conversation

@stuartmorgan-g

@stuartmorgan-g stuartmorgan-g commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Imports the following packages from flutter/packages:

  • flutter_template_images
  • multicast_dns
  • mustache_template
  • standard_message_codec

These are all packages that are used by flutter/flutter, and do not depend on the Flutter SDK, so belong at this repo's layer now that we have such a repo. This eliminates the technical debt of having circular repo dependencies.

The packages have updated repository links in pubspec.yaml, so this PR also increments the version of these packages to publish that metadata, so that links from pub.dev will come to the right place.

This will be landed as a merge commit to preserve history.

Part of flutter/flutter#185027

Pre-Review Checklist

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

davidmartos96 and others added 14 commits October 22, 2025 14:17
Support emojis in templates. The code was relying on String.length, when doing substring, which could be wrong when emojis are used.

Fixes flutter/flutter#176180

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^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.
Does all of the steps from https://github.com/flutter/flutter/blob/master/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md for the 3.38 release (except the first one, which the stable roller will handle).

This includes a lot of autoformat changes, because the N-2 is now 3.32, which means many packages are now being updated to a min Dart SDK of 3.8, triggering a formatter behavior change.
Makes the analysis options changes described in
flutter/flutter#178827:
- Adding
[omit_obvious_local_variable_types](https://dart.dev/tools/linter-rules/omit_obvious_local_variable_types)
- Adding
[specify_nonobvious_local_variable_types](https://dart.dev/tools/linter-rules/specify_nonobvious_local_variable_types)
- Adding
[specify_nonobvious_property_types](https://dart.dev/tools/linter-rules/specify_nonobvious_property_types)
- Adding
[type_annotate_public_apis](https://dart.dev/tools/linter-rules/type_annotate_public_apis)
- Removing
[always_specify_types](https://dart.dev/tools/linter-rules/always_specify_types)

After those changes, makes the following repo-wide changes:
- `dart fix --apply` in all packages and in script/tool/
- `dart format` in all packages and in script/tool/
- `update-excerpts` repo tooling command to update excerpts based on the
changes to their sources

Also updates the min Flutter/Dart SDK version to 3.35/3.9 for the
following packages, to avoid `analyze` failures in the `N-2` legacy
analysis run due to what appears to be a 3.9 change in what the Dart
analyzer continues to be an obvious local type in loop iterations:
- go_router
- google_fonts
- google_identity_services_web
- google_maps_flutter_web
- local_auth_platform_interface
- metrics_center
- multicast_dns
- pigeon
- rfw
- shared_preferences
- two_dimensional_scrollables
- vector_graphics_compiler
- mustache_template
- path_parsing

Because this is causing a significant amount of format churn already, I
took this opportunity to update the repository tooling to a min Dart SDK
of 3.8 (the N-2 stable version, so the earliest version we need the
tooling to support) to pick up the new format style, so the amount of
automated formatter change is higher in script/tool/ than in the
packages.

This does contain two manual changes (other than the repo tooling min
version):
-
flutter/packages@d700b45
changes `dynamic` to `Object?` in a few places where `dynamic` caused
analyzer warnings under the new rule set.
- Updates the repo tooling to ignore `.dart_tool/` when looking for
unexpected local `analysis_options.yaml` files, to fix issues running
the repo tool's `analyze` command locally based on recent changes in
`dart` behavior.

This does not include any CHANGELOG or version updates; even though we
normally version any changes to production code, mass automated changes
like this aren't worth the churn of releasing. This includes changes to
lib/example/main.dart and to README.md excerpts; while the style changes
will be user-visible on pub.dev, it's fine for those changes to wait for
the next release of each package.

Part of flutter/flutter#178827
Addresses error handling issues flagged in the Gemini review of mustache_template.

Changes:
- Added missing `throw` before [_error()](cci:1://file:///C:/Users/Guto_/packages-pr/third_party/packages/mustache_template/lib/src/lambda_context.dart:27:2-34:3) calls in [lambda_context.dart](cci:7://file:///C:/Users/Guto_/packages-pr/third_party/packages/mustache_template/lib/src/lambda_context.dart:0:0-0:0)
- Changed `Exception` to `StateError` for unreachable code in [parser.dart](cci:7://file:///C:/Users/Guto_/packages-pr/third_party/packages/mustache_template/lib/src/parser.dart:0:0-0:0)

Fixes flutter/flutter#174938

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^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.
Updates the repo for the 3.41 stable release.

This does everything in https://github.com/flutter/flutter/blob/master/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md except for:
- The pin update, which already landed
- The release action, which is flutter/packages#11014

## Pre-Review Checklist

[^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.
pub.dev flagged this link since it used http rather than https, but it
turns out it's also no longer a valid link; that domain doesn't resolve.
This updates to the correct domain, and to a secure link.

Part of flutter/flutter#183844

## Pre-Review Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran [the
auto-formatter].
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I followed [the version and CHANGELOG instructions], using
[semantic versioning] and the [repository CHANGELOG style], or I have
commented below to indicate which documented exception this PR falls
under[^1].
- [x] I updated/added any relevant documentation (doc comments with
`///`).
- [x] I added new tests to check the change I am making, or I have
commented below to indicate which [test exemption] this PR falls
under[^1].
- [x] All existing and new tests are passing.

[^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.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[the auto-formatter]:
https://github.com/flutter/packages/blob/main/script/tool/README.md#format-code
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[the version and CHANGELOG instructions]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version-and-changelog-updates
[semantic versioning]:
https://dart.dev/tools/pub/versioning#semantic-versions
[repository CHANGELOG style]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[test exemption]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests
…`dart test` (#11056)

This PR reorganizes the tests in mustache_template such that CI can run them, per the second option proposed in flutter/flutter#174721. The changes include a script to pull mustache specifications from the mustache repository and note the time/date and commit hash of that action, along with documentation of the above and the new test structure laid out below.

The former `all.dart` (which called three `main` functions in three test files) is now `mustache_test.dart`, and the former `mustache_test.dart` (which contained handwritten tests) is now `feature_test.dart`. The `mustache_specs.dart` file is now solely responsible for generating the tests in `mustache_test.dart` from the mustache specs, and no longer has a `main` of its own.

As this implementation doesn't support two of the optional mustache specs (inheritance and dynamic names, which were added to the mustache repo in the early 2020s, while the original mustache_template package was written in the mid-2010s), this PR also adds an UNSUPPORTED_SPECS constant in `mustache_test.dart` that skips generation of tests from those spec files.

(Separately, I'm working on an implementation of the inheritance spec, so it seemed better to pull all the specification files and selectively disable the unsupported ones.)

## Pre-Review Checklist

### Exemptions
- Version change exemption: PR affects tests only.
- CHANGELOG exemption: PR affects tests only.

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^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.
…odate dart sdk breaking change. (#11659)

This addresses dart sdk breaking change dart-lang/sdk#63216.

flutter/flutter#186155 tracks undoing this once dart rolls into flutter.
Roll Flutter from 707dbc0420a3 to 23f6f5853f50 (149 revisions)

flutter/flutter@707dbc0...23f6f58

2026-05-12 737941+loic-sharma@users.noreply.github.com Add 'cp: review' label to the manual cherrypick process (flutter/flutter#186158)
2026-05-12 engine-flutter-autoroll@skia.org Roll Packages from 19ec8b861676 to 93cbed65f336 (3 revisions) (flutter/flutter#186401)
2026-05-12 30870216+gaaclarke@users.noreply.github.com Removes SDF option for macOS (always enabled) (flutter/flutter#186265)
2026-05-12 nico.reiab@gmail.com docs: fix typos in flutter_tools comments (flutter/flutter#186321)
2026-05-12 15619084+vashworth@users.noreply.github.com Pass XcodeBasedProject instead of String to functions in XcodeProjectInterpreter (flutter/flutter#186378)
2026-05-12 jason-simmons@users.noreply.github.com Update iOS scenario app test goldens to match changes from flutter/flutter#182662 (flutter/flutter#186390)
2026-05-12 engine-flutter-autoroll@skia.org Roll Skia from ad0aff15b9fa to 77a21bc723dc (2 revisions) (flutter/flutter#186396)
2026-05-12 32538273+ValentinVignal@users.noreply.github.com Migrate focus_node.unfocus.0.dart to use `RadioGroup` (flutter/flutter#183979)
2026-05-12 engine-flutter-autoroll@skia.org Roll Skia from 91d3c1e730af to ad0aff15b9fa (7 revisions) (flutter/flutter#186391)
2026-05-12 bdero@google.com [Flutter GPU] Allow customizing the vertex layout on a RenderPipeline (flutter/flutter#186310)
2026-05-12 97480502+b-luk@users.noreply.github.com Fix `EmbedderTest.CanRenderTextWithImpellerMetal` test breakage (flutter/flutter#186262)
2026-05-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from rFhU-YPqdCRCtCz7b... to z7ICmPtn4hspu02zk... (flutter/flutter#186384)
2026-05-12 bdero@google.com [Impeller] GLES: lazily allocate texture mip levels on first per-level write (flutter/flutter#186302)
2026-05-12 bdero@google.com [Android] Propagate --enable-flutter-gpu Intent extra to engine args (flutter/flutter#186298)
2026-05-11 47866232+chunhtai@users.noreply.github.com [ci] update no-response workflow to also look for old label name in e… (flutter/flutter#186373)
2026-05-11 bdero@google.com [ImpellerC] Write a depfile when --shader-bundle is in use (flutter/flutter#186341)
2026-05-11 nico.reiab@gmail.com docs: fix doubled-word typos in comments (flutter/flutter#186320)
2026-05-11 engine-flutter-autoroll@skia.org Roll Skia from 32281401997e to 91d3c1e730af (4 revisions) (flutter/flutter#186368)
2026-05-11 15619084+vashworth@users.noreply.github.com Show SwiftPM warnings right before iOS/macOS build (flutter/flutter#185984)
2026-05-11 15619084+vashworth@users.noreply.github.com Convert rebuilding-flutter-tool script to dart (flutter/flutter#185089)
2026-05-11 15619084+vashworth@users.noreply.github.com Use Xcode's LLDB (flutter/flutter#186273)
2026-05-11 mr-peipei@web.de Remove `currentMainUri` from `generateMainDartWithPluginRegistrant` (flutter/flutter#185907)
2026-05-11 engine-flutter-autoroll@skia.org Roll Skia from 2514f6b5f92b to 32281401997e (1 revision) (flutter/flutter#186349)
2026-05-11 engine-flutter-autoroll@skia.org Roll Packages from 92552b16bcc1 to 19ec8b861676 (4 revisions) (flutter/flutter#186350)
2026-05-11 1063596+reidbaker@users.noreply.github.com Check for absolute paths in skills.  (flutter/flutter#185632)
2026-05-11 engine-flutter-autoroll@skia.org Roll Skia from 9fb7d2814642 to 2514f6b5f92b (1 revision) (flutter/flutter#186347)
2026-05-11 engine-flutter-autoroll@skia.org Roll Skia from 8cafb209e836 to 9fb7d2814642 (4 revisions) (flutter/flutter#186335)
2026-05-10 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from sOBiPJb0xznDBZlf5... to rFhU-YPqdCRCtCz7b... (flutter/flutter#186328)
2026-05-10 engine-flutter-autoroll@skia.org Roll Skia from 05a03f99c74e to 8cafb209e836 (1 revision) (flutter/flutter#186315)
2026-05-10 bdero@google.com [Impeller] Vulkan: don't drop user-supplied viewport X, Y, and depth range (flutter/flutter#185886)
2026-05-09 mbrase@google.com Update Fuchsia tests to subpackage their child components (flutter/flutter#186259)
2026-05-09 victorsanniay@gmail.com Fix SelectableText crash with inline lambda contextMenuBuilder (flutter/flutter#184990)
2026-05-09 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 5_TnhTsHSqtCx37o6... to sOBiPJb0xznDBZlf5... (flutter/flutter#186289)
2026-05-09 engine-flutter-autoroll@skia.org Roll Skia from dc78d4bd2efb to 05a03f99c74e (2 revisions) (flutter/flutter#186283)
2026-05-09 22373191+Hari-07@users.noreply.github.com Improve non rect platform view rendering  (flutter/flutter#182662)
2026-05-08 engine-flutter-autoroll@skia.org Roll Skia from 31521f8508c7 to dc78d4bd2efb (1 revision) (flutter/flutter#186278)
2026-05-08 30870216+gaaclarke@users.noreply.github.com Moves wide_gamut_macos to arm64 (flutter/flutter#186214)
2026-05-08 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[iOS] Migrate VSyncClient to a pure Obj-C implementation (#186166)" (flutter/flutter#186266)
2026-05-08 engine-flutter-autoroll@skia.org Roll Skia from a00db8749edb to 31521f8508c7 (2 revisions) (flutter/flutter#186264)
2026-05-08 97480502+b-luk@users.noreply.github.com Optimize compatible `DrawDiffRoundRect` calls to use `DrawRoundRect` (flutter/flutter#186203)
2026-05-08 bdero@google.com [triage] Add Flutter GPU as a triage team (flutter/flutter#186263)
2026-05-08 dmgr@google.com doc: Unified Check-Run User manual (flutter/flutter#186210)
2026-05-08 engine-flutter-autoroll@skia.org Roll Skia from 5f7adf4403d6 to a00db8749edb (1 revision) (flutter/flutter#186257)
2026-05-08 engine-flutter-autoroll@skia.org Roll Packages from cfdd1d3 to 92552b16bcc1 (1 revision) (flutter/flutter#186256)
2026-05-08 34871572+gmackall@users.noreply.github.com Add logging to figure out jvm crashes for `hot_mode_tests` (flutter/flutter#186107)
2026-05-08 engine-flutter-autoroll@skia.org Roll Skia from 926c09741ce2 to 5f7adf4403d6 (3 revisions) (flutter/flutter#186242)
...
Replaces all of the following repo tooling commands with a new unified `validate` command:
- `dependabot-check`
- `gradle-check`
- `pubspec-check`
- `readme-check`
- `repo-package-info-check`
- `version-check`

It also makes some simplifications in using these:
- Temporarily disabling the code excerpt check is now done via package-level ci_config.yaml files. This means that we don't have to exempt a package from the entire command just for this, and also means that fixing a package and removing its exemption will no longer trigger whole-repo testing as it used to.
- Setting the min Flutter version allowed for the repo is now a repo-level config in a new root level `tool_config/` directory. This avoids the need to pass a flag every time for something that isn't actually intended to be variable.
- The allowed dependencies are now also in hard-coded locations in the `tool_config/` directory, instead of having to pass them in all the time, to make the commands easier to call. As with min SDK version, this isn't something callers actually need to be able to change on the fly to the flags add more complexity (in exchange for making it extremely clear at the CI call site what was happening, but I no longer think that tradeoff is the right one based on experience using the tool).

To avoid huge amounts of test file churn, and massively complicating test setup, there is a test-only mechanism to select individual validators to run in tests, rather than having to test the entire command at once.

Part of flutter/flutter#173413
It seems like we're supposed to keep analysis_options.dart in sync with the one in flutter/flutter, but we haven't done it since 2023. This PR updates it. The most disruptive change appears to be the increased page width.

I'm inspired to update this after working on flutter/packages#11669, which imports flutter/flutter code that is formatted according to the latest rules. Better to update the rules than to format the new code back to the old rules.

*Update*: This only updates the line width. Other changes will follow.
@google-cla

google-cla Bot commented Jun 5, 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.

@stuartmorgan-g stuartmorgan-g merged commit 2257cc1 into flutter:main Jun 9, 2026
12 checks passed
@stuartmorgan-g

Copy link
Copy Markdown
Collaborator Author

The packages have updated repository links in pubspec.yaml, so this PR also increments the version of these packages to publish that metadata, so that links from pub.dev will come to the right place.

For posterity: it turns out that I hadn't actually pushed this change, and I didn't notice since there was nothing in the PR to diff against. #20 has the changes that were intended for this PR.

@stuartmorgan-g stuartmorgan-g deleted the import-from-packages branch June 9, 2026 15:47
tarrinneal pushed a commit that referenced this pull request Jun 9, 2026
#18 was intended to bump
versions to publish from the new locations, but I still had these
changes locally, so they didn't publish. (Instead, they failed release
because it tried to re-publish the existing versions.)

This adds the version bumps that were intended to be included in that
PR.

Part of flutter/flutter#185027
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 10, 2026
Removes the following packages, and their repo-level metadata:
- flutter_template_images
- multicast_dns
- mustache_template
- standard_message_codec

All of these have been moved to flutter/core-packages in flutter/core-packages#18

Fixes flutter/flutter#185027
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
Removes the following packages, and their repo-level metadata:
- flutter_template_images
- multicast_dns
- mustache_template
- standard_message_codec

All of these have been moved to flutter/core-packages in flutter/core-packages#18

Fixes flutter/flutter#185027
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.