Visitar URL original
[tool] Migrate TestCommand and platform runner to modular dependency injection by bkonyi · Pull Request #190789 · flutter/flutter · GitHub
Skip to content

[tool] Migrate TestCommand and platform runner to modular dependency injection - #190789

Merged
auto-submit[bot] merged 84 commits into
flutter:masterfrom
bkonyi:di/21-testing-subsystem
Sep 30, 2026
Merged

auto-submit[bot] merged 84 commits into
flutter:masterfrom
bkonyi:di/21-testing-subsystem

Conversation

@bkonyi

@bkonyi bkonyi commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

This pull request migrates TestCommand, FlutterTestRunner, FlutterPlatform, FlutterWebPlatform, and TestGoldenComparator to modular dependency injection using ToolContext.

This is Layer 21c in the modular dependency injection migration for the testing subsystem (Layer 21a #192923 and Layer 21b #192924 have merged into master).

Fork Compare Link

Part of #188471.

Tests

  • test/commands.shard/hermetic/test_test.dart
  • test/general.shard/flutter_platform_test.dart
  • test/commands.shard/hermetic/flutter_web_platform_test.dart
  • test/general.shard/test/test_golden_comparator_test.dart
  • test/integration.shard/test_golden_comparator_test.dart

@github-actions github-actions Bot added tool Affects the "flutter" command-line tool. See also t: labels. a: desktop Running on desktop team-android Owned by Android platform team team-ios Owned by iOS platform team team-macos Owned by the macOS platform team team-windows Owned by the Windows platform team team-linux Owned by the Linux platform team labels Aug 8, 2026
@bkonyi
bkonyi force-pushed the di/21-testing-subsystem branch from 84257b6 to d712613 Compare August 11, 2026 14:48
@bkonyi
bkonyi force-pushed the di/21-testing-subsystem branch from d712613 to be650b9 Compare August 11, 2026 15:32
@bkonyi
bkonyi force-pushed the di/21-testing-subsystem branch 3 times, most recently from c0c05d8 to 2e0a254 Compare August 11, 2026 20:00
bkonyi added 4 commits August 12, 2026 17:19
# Conflicts:
#	packages/flutter_tools/lib/src/context/tool_dependencies.dart
#	packages/flutter_tools/test/general.shard/context/dependency_injection_test.dart
@bkonyi
bkonyi force-pushed the di/21-testing-subsystem branch from 2e0a254 to 6c4b942 Compare August 12, 2026 18:17
@bkonyi bkonyi mentioned this pull request Sep 25, 2026
11 tasks done
@bkonyi
bkonyi requested a review from dcharkes September 28, 2026 12:08
import 'tool_context.dart';

/// Bootstraps and manages tool dependencies.
class ToolDependencies {

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.

How is this different from ToolContext? maybe add more doc comments with the "why" on both.

Both like like the are a bunch of singletons that don't change.

Should ToolDependencies take a ToolContext or the other way around?

Judging from #190724 (comment) they do serve a different role. So maybe explain in the class dartdocs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done!

@bkonyi
bkonyi requested a review from dcharkes September 28, 2026 16:51
dcharkes
dcharkes previously approved these changes Sep 29, 2026
@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 29, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 29, 2026
@auto-submit

auto-submit Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

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

@auto-submit

auto-submit Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/190789, because Pull request flutter/flutter/190789 is not in a mergeable state.

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 30, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Sep 30, 2026
Merged via the queue into flutter:master with commit 1be6586 Sep 30, 2026
23 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 30, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Sep 30, 2026
flutter/flutter@55b8f88...d649d2b

2026-09-30 43054281+camsim99@users.noreply.github.com [Android] Update the CLI to reject passing engine configuration flags with a prebuilt binary in release mode (flutter/flutter#190870)
2026-09-30 engine-flutter-autoroll@skia.org Roll Skia from af1e8b356dd1 to c7b323126bf0 (1 revision) (flutter/flutter#193569)
2026-09-30 zhongliu88889@gmail.com [web] Respect text affinity in getLineBoundary at a soft wrap (flutter/flutter#192664)
2026-09-30 bkonyi@google.com [tool] Migrate TestCommand and platform runner to modular dependency injection (flutter/flutter#190789)
2026-09-30 engine-flutter-autoroll@skia.org Roll Skia from 3a20a0464d25 to af1e8b356dd1 (1 revision) (flutter/flutter#193564)
2026-09-30 engine-flutter-autoroll@skia.org Roll Skia from 554ef62d11a9 to 3a20a0464d25 (6 revisions) (flutter/flutter#193556)
2026-09-30 116356835+AbdeMohlbi@users.noreply.github.com Use null aware elements in `platform_views.dart` (flutter/flutter#193214)
2026-09-30 116356835+AbdeMohlbi@users.noreply.github.com Replace deprecated `withOpacity` in `flutter_logo.dart` (flutter/flutter#192583)
2026-09-30 engine-flutter-autoroll@skia.org Roll Skia from f441ca223b2b to 554ef62d11a9 (72 revisions) (flutter/flutter#193548)
2026-09-30 joel.winarske@linux.com Fix StrcmpFixed matching prefixes in the Vulkan embedder tests (flutter/flutter#192999)
2026-09-30 jesswon@google.com Update Engine to test Android 17 AVD (flutter/flutter#193239)
2026-09-29 joel.winarske@linux.com Give the Vulkan test context the extensions Impeller requires (flutter/flutter#193002)
2026-09-29 55765052+MohanadAbdallah-mv@users.noreply.github.com Rename "subtext" to "supportingTextPadding" in `FormField`'s documentation (flutter/flutter#183582)
2026-09-29 markzipan@google.com Set --no-js-strongly-connected-components for DDC compiles by default (flutter/flutter#193485)
2026-09-29 jesswon@google.com Split pre-AGP 8.3 module AAR test into a Java 17 pinned target (flutter/flutter#193467)
2026-09-29 32538273+ValentinVignal@users.noreply.github.com Remove no-shuffle from gen_defaults_test (flutter/flutter#192280)
2026-09-29 katelovett@google.com Update guidance on bumping Dart (flutter/flutter#193131)
2026-09-29 dbebawy@users.noreply.github.com Remove vestigial `download_jdk` gclient var (flutter/flutter#188571)
2026-09-29 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#193522)
2026-09-29 bkonyi@google.com [flutter_tools] Lazily initialize AndroidSdk platform and build-tools discovery (flutter/flutter#191972)
2026-09-29 bkonyi@google.com [tool] Migrate Web build subcommands and toolchain to modular dependency injection (flutter/flutter#190783)
2026-09-29 matt.boetger@gmail.com Pin androidx.test dependencies in integration_test (flutter/flutter#193316)
2026-09-29 Deil.Christoph@gmail.com [flutter_tools] Include flutter.js.map in web builds (flutter/flutter#192257)
2026-09-29 Rusino@users.noreply.github.com [WebParagraph] Fixing edge cases for wrapping text (with newlines) (flutter/flutter#189858)
2026-09-29 ryjohn@google.com Bump customer testing version for flutter/devtools update (flutter/flutter#193511)
2026-09-29 engine-flutter-autoroll@skia.org Roll Packages from ba0364a to 3c6ce59 (14 revisions) (flutter/flutter#193507)
2026-09-29 bkonyi@google.com [flutter_tools] Guard socket streams and done futures against socket reset errors (flutter/flutter#192941)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC quncheng@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
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
…injection (flutter#190789)

## Description

This pull request migrates `TestCommand`, `FlutterTestRunner`,
`FlutterPlatform`, `FlutterWebPlatform`, and `TestGoldenComparator` to
modular dependency injection using `ToolContext`.

This is Layer 21c in the modular dependency injection migration for the
testing subsystem (Layer 21a
[flutter#192923](flutter#192923) and Layer 21b
[flutter#192924](flutter#192924) have merged
into `master`).

### Fork Compare Link
* Compare:
bkonyi/flutter@master...di/21-testing-subsystem

Part of [flutter#188471](flutter#188471).

## Tests
* `test/commands.shard/hermetic/test_test.dart`
* `test/general.shard/flutter_platform_test.dart`
* `test/commands.shard/hermetic/flutter_web_platform_test.dart`
* `test/general.shard/test/test_golden_comparator_test.dart`
* `test/integration.shard/test_golden_comparator_test.dart`
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. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants