Skip to content

[flutter_tools] Replace ResidentWebRunner with WebFlutterDevice - #197233

Draft
bkonyi wants to merge 5 commits into
flutter:masterfrom
bkonyi:web-runner-5-cutover
Draft

bkonyi wants to merge 5 commits into
flutter:masterfrom
bkonyi:web-runner-5-cutover

Conversation

@bkonyi

@bkonyi bkonyi commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Wires WebFlutterDevice through webFlutterDeviceBuilder in lib/executable.dart and requires it in WebDevice.createFlutterDevice, removing the temporary WebCapabilityFlutterDevice bridge.

Cuts over RunCommand, Daemon/AppDomain, WidgetPreviewStartCommand, and DriveCommand/WebDriverService to dispatch to HotRunner and ColdRunner via FlutterDevice.usesHotRunner.

Deletes ResidentWebRunner, WebRunnerFactory, DwdsWebRunnerFactory, and their legacy tests and references.

Builds on #197232. Diff from parent: bkonyi/flutter@web-runner-4-web-flutter-device...web-runner-5-cutover

Stack:

  1. [flutter_tools] Extract PlatformDebuggingOptions and move WebDebugConfig #197229
  2. [flutter_tools] Add WebContext, Device.createFlutterDevice, and WebDeviceLogReader #197230
  3. [flutter_tools] Add polymorphic FlutterDevice seams to resident runners #197231
  4. [flutter_tools] Add WebFlutterDevice and unit tests #197232
  5. [flutter_tools] Replace ResidentWebRunner with WebFlutterDevice #197233

Introduces `PlatformDebuggingOptions` and `DebuggingOptions.platformOptions` so platform-specific debugging configuration no longer lives in `device.dart`. Moves `WebDebugConfig` into `lib/src/web/web_debug_config.dart`, absorbs `nativeNullAssertions` and `webDefines` into `WebDebugConfig`, and passes `WebDebugConfig` directly to `WebDevFS` and `WebAssetServer.start`.

Removes dead legacy compatibility keys (`webUseLocalCanvaskit`, `dumpSkpOnShaderCompilation`, `cacheSkSL`, `fastStart`) from `DebuggingOptions.toJson()`, drops redundant `webDefines` forwarding parameters across runners and driver services, and preserves `ProxiedDevice` JSON round-trip parsing via `PlatformDebuggingOptionsParser`.
…viceLogReader

Introduces `WebContext` (with `chromiumLauncher`, `webWorkflow`, and optional `WebFlutterDeviceBuilder`) and wires it through `ToolDependencies`, `FlutterDeviceManager`, `WebDevices`, `WebDevice`, and `DoctorValidatorsProvider`.

Adds `Device.createFlutterDevice`, extracts `FlutterDevice.createCompilers` / `FlutterDevice.createDefault`, migrates all `FlutterDevice.create` callers, and removes `FlutterDevice.create`.

Adds `WebDeviceLogReader` streaming `Stdout` and `Stderr` VM service events and consolidates log reader and disposal handling onto `WebDevice`.
Replace web-specific checks in `ResidentRunner`, `HotRunner`, `ColdRunner`, and `DartDevelopmentService` with polymorphic capability and lifecycle hooks on `FlutterDevice`.

Add deferred service protocol startup and hot reload/restart hooks in `HotRunner`, cold restart support in `ColdRunner`, a detach guard on `ResidentRunner.exit`, and `WebCapabilityFlutterDevice` returned by `WebDevice.createFlutterDevice` to preserve web capability behavior prior to migrating off `ResidentWebRunner`.
Adds `WebFlutterDevice`, a `FlutterDevice` subclass that implements web-specific hot and cold launch, deferred DWDS attachment, `WebDeviceLogReader` log streaming, hot reload/restart, cold `Page.reload` restart, connection exception mapping, and cleanup on top of `HotRunner` and `ColdRunner`.

Adds hermetic `testWithoutContext` unit test suites covering cold (`web_flutter_device_cold_test.dart`) and hot (`web_flutter_device_hot_test.dart`) web lifecycles.
Wire `WebFlutterDevice` through `webFlutterDeviceBuilder` in `lib/executable.dart` and require it in `WebDevice.createFlutterDevice`, removing the temporary `WebCapabilityFlutterDevice` bridge.

Cut over `RunCommand`, `Daemon`/`AppDomain`, `WidgetPreviewStartCommand`, and `DriveCommand`/`WebDriverService` to dispatch to `HotRunner` and `ColdRunner` via `FlutterDevice.usesHotRunner`.

Delete `ResidentWebRunner`, `WebRunnerFactory`, `DwdsWebRunnerFactory`, and their legacy tests and references.
@bkonyi bkonyi added the CICD Run CI/CD label Nov 23, 2026
@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 23, 2026
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-flutter__flutter that referenced this pull request Nov 24, 2026
…fig (flutter#197229)

Introduces `PlatformDebuggingOptions` and
`DebuggingOptions.platformOptions` so platform-specific debugging
configuration no longer lives in `device.dart`. Moves `WebDebugConfig`
into `lib/src/web/web_debug_config.dart`, absorbs `nativeNullAssertions`
and `webDefines` into `WebDebugConfig`, and passes `WebDebugConfig`
directly to `WebDevFS` and `WebAssetServer.start`.

Removes dead legacy compatibility keys (`webUseLocalCanvaskit`,
`dumpSkpOnShaderCompilation`, `cacheSkSL`, `fastStart`) from
`DebuggingOptions.toJson()`, drops redundant `webDefines` forwarding
parameters across runners and driver services, and preserves
`ProxiedDevice` JSON round-trip parsing via
`PlatformDebuggingOptionsParser`.

Stack:
1. flutter#197229
2. flutter#197230
3. flutter#197231
4. flutter#197232
5. flutter#197233
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.

1 participant