Repository navigation
Conversation
Proposes a first-class, isolate-based platform extension architecture for the Flutter CLI (`flutter_tools`) that decouples custom and embedded target platform tooling from the core Flutter SDK into project-scoped Dart packages (`package:flutter_tools_extension` and `package:flutter_tools_core`).
bkonyi
force-pushed
the
rfc-510-tool-extensions
branch
from
October 30, 2026 18:27
a6b1ae9 to
93d53ea
Compare
bkonyi
requested review from
chingjun,
dcharkes,
jmagman,
loic-sharma,
mboetger and
vashworth
October 30, 2026 19:48
bkonyi
marked this pull request as ready for review
November 2, 2026 18:08
…ing options - Add `ToolExtensionService.getConfigurationValues()` (`extension.getConfigurationValues`) for reading extension-owned `flutter config` settings at runtime in service subclasses, and pass `ExtensionBuildContext.configuration` into `BuildTarget` and `AssembleTarget` so `flutter assemble` tracks configuration changes. - Expand `ExtensionBuildContext` and `ExtensionAssembleContext` with `codeSizeDirectory`, `dartObfuscation`, `extraFrontEndOptions`, `extraGenSnapshotOptions`, `splitDebugInfo`, `targetDeviceId`, `trackWidgetCreation`, and `treeShakeIcons`. - Define `ExtensionDebuggingOptions` with `engineSwitches`, `deviceVmServicePort`, `hostVmServicePort`, `dartEntrypointArgs`, `route`, and `uninstallFirst`.
…cal artifacts - Add `ToolExtensionService.promptForInput()` (`terminal.promptForInput`) for free-form text and passphrase input in interactive `ConfigAction` flows. - Add `targetOs` and `shaderTargets` (`ExtensionShaderTarget`) to `BuildTarget` for `BuiltInTargets.kernelSnapshot`, `BuiltInTargets.copyAssets`, and `flutter run` shader hot reload. - Specify `TemplateService.generatePluginPlatformConfig`, `flutter create --no-platforms`, `BuildTarget.resolveNativeAssetsConfig`, `DeviceService.launchApp` `prebuiltApplication`, `ArtifactDependency.local`, and `flutter daemon` multi-root discovery.
Adds `DeviceService.resolveApplication` (`ExtensionApplicationResolutionContext` and `ExtensionApplicationPackage`), `appId` parameters across `launchApp`, `startLogStream`, `getVmServiceUri`, and `stopApp`, and `prebuiltApplication` on `installApp` to support `flutter logs`, `flutter install`, `flutter drive`, and `flutter test integration_test -d <device>`. Also clarifies absolute `ExtensionBuildContext.mainPath` semantics and `TargetDevice.supportsInstall` gating across `installApp`, `uninstallApp`, and `isAppInstalled`.
dcharkes
reviewed
Nov 3, 2026
loic-sharma
reviewed
Nov 3, 2026
loic-sharma
reviewed
Nov 3, 2026
loic-sharma
reviewed
Nov 3, 2026
loic-sharma
reviewed
Nov 3, 2026
…fact executables in RFC 510.0000 - Expand `TemplateService` with custom CLI `flags` (`TemplateFlag`) and `options` (`TemplateOption`), dynamic `resolvePlatformTemplate` (`ExtensionPlatformTemplate` with validated `overwritePaths` and insert-if-missing `dependencies`), `ffiPluginPlatformTemplates`, `*Platforms` discovery getters (`appPlatforms`, `pluginPlatforms`, `ffiPluginPlatforms`), `templateType` on `generatePluginPlatformConfig`, and add-to-app module build guidance. - Add `ExtensionBuildResult.bundleDirectoryUri` and `aotSnapshotFileName` to support host `SizeAnalyzer.analyzeAotSnapshot` when `--analyze-size` is passed to `flutter build <name>`. - Add `DeviceService.createEmulator` returning `TargetEmulator` and specify `--platform` disambiguation on `flutter emulators --create`. - Align `ArtifactService` on `listRequiredArtifacts`, `ArchiveFormat`, `RemoteArtifactDependency` (`executables` and `isExecutable` for POSIX `chmod +x`), and `const factory ArtifactDependency.local` (`LocalArtifactDependency`). Pure RFC documentation update; verified with `bin/rfc_lint.dart --enforce-drafts` and `bin/validate_rfc_number.dart --base-branch origin/main` (no unit tests apply).
- Replace `extension/flutter_tools/config.yaml` and `package:extension_discovery` with direct-dependency `pubspec.yaml` discovery of `extension/flutter_tools/extension.dart`, typed `supportedHostPlatforms` (`Set<HostPlatform>?`) on `ToolExtensionEntryPoint.run` (with `final class HostPlatform` static constants), and cached `ToolExtensionCapabilities` handshake metadata. - Specify two-tier `.dill` cache keying across exact Dart SDK revisions and immutable (`hosted`/`git`) dependency closures, plus `extension.dill.stamp` freshness ordering for mutable (`path:`/workspace) extensions and multi-project `flutter daemon` sessions. - Document why pure-Dart wire and diagnostic models live in `package:flutter_tools_core` rather than re-exporting `package:code_assets` or `package:hooks`. - Clarify the three-package boundary between `package:flutter_tools_core`, `package:flutter_tools_extension`, and `package:flutter_tools` with a horizontal Mermaid architecture diagram, add the `flutter daemon` IDE integration summary bullet, and fix the `flutter-tizen` reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposes a first-class, isolate-based platform extension architecture for the Flutter CLI (
flutter_tools) that decouples custom and embedded target platform tooling from the core Flutter SDK into project-scoped Dart packages (package:flutter_tools_extensionandpackage:flutter_tools_core).Extensions are discovered from direct
dev_dependenciesviapackage:extension_discovery(extension/flutter_tools/config.yaml), compiled to cached kernel.dillsnapshots, and spawned in background isolates communicating over a bidirectional JSON-RPC 2.0 protocol (package:json_rpc_2). This allows third-party and custom embedder authors to integrate devices, emulators, build and assemble targets, platform scaffolding templates, SDK artifacts, configuration flags/actions, and doctor diagnostics directly into standardfluttercommands without forking the Flutter SDK or maintaining wrapper CLIs.Tracking issue: flutter/flutter#190755
Pre-launch Checklist
design doc.dart run bin/assign_rfc_number.dartlocally when instructed).If you need help, consider asking for advice on the #hackers channel on Discord.