Skip to content

Skip platform-specific plugin registration if no platforms enabled#186304

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
Mr-Pepe:05-09-skip_platform-specific_plugin_registration_if_no_platforms_enabled
Jun 17, 2026
Merged

Skip platform-specific plugin registration if no platforms enabled#186304
auto-submit[bot] merged 2 commits into
flutter:masterfrom
Mr-Pepe:05-09-skip_platform-specific_plugin_registration_if_no_platforms_enabled

Conversation

@Mr-Pepe

@Mr-Pepe Mr-Pepe commented May 10, 2026

Copy link
Copy Markdown
Contributor

Towards #69429 (make flutter test faster).

It's only a small win but skipping platform-specific plugin registration when no platforms are actually enabled saves 30-50ms on any flutter invocation, for example when running flutter test in packages/flutter.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 10, 2026
@Mr-Pepe Mr-Pepe marked this pull request as ready for review May 10, 2026 05:08

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

Copy link
Copy Markdown
Contributor

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 introduces an early return in the platform-specific tooling regeneration process when no target platforms are enabled, preventing unnecessary plugin list refreshes. A corresponding test case was added to verify this behavior for projects without platform directories. Feedback indicates that the platform check is missing fuchsiaPlatform, which should be included to ensure plugin registration is not incorrectly skipped for Fuchsia-only projects.

Comment thread packages/flutter_tools/lib/src/project.dart
@bkonyi bkonyi added the team-tool Owned by Flutter Tool team label Jun 10, 2026
@bkonyi bkonyi requested review from bkonyi and chingjun June 16, 2026 21:23
@bkonyi bkonyi added the CICD Run CI/CD label Jun 16, 2026
bkonyi
bkonyi previously approved these changes Jun 16, 2026
chingjun
chingjun previously approved these changes Jun 16, 2026
@chingjun chingjun added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 16, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 16, 2026
@auto-submit

auto-submit Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/186304, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@auto-submit

auto-submit Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/186304, because - The status or check suite Linux analyze has failed. Please fix the issues identified (or deflake) before re-applying this label.

Towards flutter#69429 (make flutter test faster).

It's only a small win but skipping platform-specific plugin registration
when no platforms are actually enabled saves 30-50ms of time on any
`flutter` invocation, for example when running `flutter test` in
`packages/flutter`.
@Mr-Pepe Mr-Pepe dismissed stale reviews from chingjun and bkonyi via 9754404 June 17, 2026 03:57
@Mr-Pepe Mr-Pepe force-pushed the 05-09-skip_platform-specific_plugin_registration_if_no_platforms_enabled branch from 055ed93 to 9754404 Compare June 17, 2026 03:57
@github-actions github-actions Bot removed team-tool Owned by Flutter Tool team CICD Run CI/CD labels Jun 17, 2026
@Mr-Pepe

Mr-Pepe commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Fixed formatting. Rebased on newest master.

This is my ~10th PR in the past half a year, most were small changes. The testing story in Flutter has always felt pretty badly neglected since I started using it in 2020 and I always thought it would be cool to improve things. My PRs so far were mostly to test out the waters and honestly, I've found the experience to be less enjoyable than I hoped for, considering how long it takes to get even small changes reviewed and merged. So I don't think I will even try to attempt anything more substantial (actually already made my peace with it and forgot about this PR).

No hard feelings, I'm sure you guys have lots of stuff on your plates. Just thought I'd leave some feedback here instead of vanishing without a word.

@bkonyi bkonyi added CICD Run CI/CD and removed CICD Run CI/CD labels Jun 17, 2026
@fluttergithubbot

Copy link
Copy Markdown
Contributor

An existing Git SHA, 975440481141070e20af0581cdf0d824f387dac5, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@bkonyi

bkonyi commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fixed formatting. Rebased on newest master.

This is my ~10th PR in the past half a year, most were small changes. The testing story in Flutter has always felt pretty badly neglected since I started using it in 2020 and I always thought it would be cool to improve things. My PRs so far were mostly to test out the waters and honestly, I've found the experience to be less enjoyable than I hoped for, considering how long it takes to get even small changes reviewed and merged. So I don't think I will even try to attempt anything more substantial (actually already made my peace with it and forgot about this PR).

No hard feelings, I'm sure you guys have lots of stuff on your plates. Just thought I'd leave some feedback here instead of vanishing without a word.

Thanks for the feedback @Mr-Pepe, and sorry to hear the experience hasn't been great. As I'm the TL for the tool and the only engineer responsible for triaging and performing initial reviews on relevant PRs, the slow review times are on me. With the ever increasing number of AI agent generated PRs, sifting through reviews has been taking more and more time and sometimes quality PRs slip by. This is something other Flutter subteams have been experiencing as well.

I'm actively working on improving the PR triage and review process for the tool to prioritize PRs from known quality contributors, in addition to prioritizing small PRs that don't require significant investments to review immediately. This will hopefully reduce review latency.

We'll get this PR landed once the checks pass, and if you decide you want to submit more PRs in the future we'd be happy to accept them 😃

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 17, 2026
@bkonyi bkonyi added the CICD Run CI/CD label Jun 17, 2026
@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 17, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Jun 17, 2026
Merged via the queue into flutter:master with commit b10d0f1 Jun 17, 2026
166 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 17, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 17, 2026
flutter/flutter@3a0420c...b10d0f1

2026-06-17 mr-peipei@web.de Skip platform-specific plugin registration if no platforms enabled (flutter/flutter#186304)
2026-06-17 engine-flutter-autoroll@skia.org Roll Packages from 8286d39 to 6ce00a8 (1 revision) (flutter/flutter#188109)
2026-06-17 engine-flutter-autoroll@skia.org Roll Skia from 79f93fd5f36e to 5d19002eb73e (1 revision) (flutter/flutter#188108)
2026-06-17 simon@journeyapps.com Import `dart:_js_interop_wasm` in addition to `dart:_wasm` to convert between `JSAny` and `WasmExternRef?` (flutter/flutter#186974)
2026-06-17 engine-flutter-autoroll@skia.org Roll Dart SDK from f811ecae9ca0 to e39bde5b1bfc (2 revisions) (flutter/flutter#188107)
2026-06-17 engine-flutter-autoroll@skia.org Roll Skia from 026f6a6be2b9 to 79f93fd5f36e (1 revision) (flutter/flutter#188105)
2026-06-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 462bf0a1d489 to f811ecae9ca0 (1 revision) (flutter/flutter#188099)
2026-06-17 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from VeLhhlDcod09NR4Hb... to or21OEdGtairm6nl9... (flutter/flutter#188098)
2026-06-17 engine-flutter-autoroll@skia.org Roll Skia from 2ffd155313f5 to 026f6a6be2b9 (10 revisions) (flutter/flutter#188097)
2026-06-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 824b4b48b6d4 to 462bf0a1d489 (1 revision) (flutter/flutter#188093)
2026-06-17 jason-simmons@users.noreply.github.com Manual Dart roll from f6c31f4c3a63 to 824b4b48b6d4 (flutter/flutter#188023)
2026-06-17 awolff@google.com Add a platform view test to android_hardware_smoke_test (flutter/flutter#188069)
2026-06-17 44747303+theprantadutta@users.noreply.github.com [flutter_tools] Format empty app template with latest dart format (flutter/flutter#187443)
2026-06-16 49699333+dependabot[bot]@users.noreply.github.com Bump the all-github-actions group across 1 directory with 3 updates (flutter/flutter#188086)
2026-06-16 engine-flutter-autoroll@skia.org Roll Skia from d7196b0b4939 to 2ffd155313f5 (9 revisions) (flutter/flutter#188081)
2026-06-16 43089218+chika3742@users.noreply.github.com Prevent downgrading `project.pbxproj` when greater version number (flutter/flutter#186250)
2026-06-16 magder@google.com Only allow dependabot to autoupdate GitHub-owned actions (flutter/flutter#187936)
2026-06-16 matt.boetger@gmail.com Fall back to source AndroidManifest.xml if AAPT fails or returns garbage (flutter/flutter#187197)
2026-06-16 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#187769)
2026-06-16 jason-simmons@users.noreply.github.com [Impeller] Move queue submission into a callback that is invoked by FenceWaiterVK::AddFence only if it can accept the fence (flutter/flutter#187761)
2026-06-16 jhy03261997@gmail.com Reland [a11y] Map some framework semantics roles to android classes.  (flutter/flutter#188037)
2026-06-16 1961493+harryterkelsen@users.noreply.github.com refactor(web): Unify Image on Skwasm and CanvasKit (flutter/flutter#187873)
2026-06-16 30870216+gaaclarke@users.noreply.github.com Adds arm64 variant of impeller devicelab tests for windows. (flutter/flutter#188053)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jun 18, 2026
…lutter#186304)

Towards flutter#69429 (make flutter test faster).

It's only a small win but skipping platform-specific plugin registration
when no platforms are actually enabled saves 30-50ms on any `flutter`
invocation, for example when running `flutter test` in
`packages/flutter`.

## Pre-launch 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] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

Co-authored-by: Ben Konyi <bkonyi@google.com>
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…lutter#186304)

Towards flutter#69429 (make flutter test faster).

It's only a small win but skipping platform-specific plugin registration
when no platforms are actually enabled saves 30-50ms on any `flutter`
invocation, for example when running `flutter test` in
`packages/flutter`.

## Pre-launch 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] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

Co-authored-by: Ben Konyi <bkonyi@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants