Repository navigation
[flutter_tools] Verify local engine option propagation across tool commands and DI - #192510
Merged
auto-submit[bot] merged 10 commits intoOct 7, 2026
Merged
Conversation
…mmands and DI Tests that local engine options specified via CLI flags or artifacts are properly propagated to where they are needed across the flutter tool: - Hermetic unit tests for `AssembleCommand`, `BuildLinuxCommand`, `BuildWindowsCommand`, `BuildMacOSCommand`, `BuildIOSCommand`, and `BuildWebCommand`. - Unit tests for `BundleBuilder`, `ToolDependencies.bootstrap`, and `FlutterCommandRunner`. - Synthetic integration test for `flutter build linux --config-only`. - Refactored `Artifacts.getLocalEngine` to require all dependencies explicitly, eliminating ambient context fallbacks. Addresses flutter#192361 (comment).
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors Artifacts.getLocalEngine to accept dependencies as required named parameters instead of relying on global variables, and updates FlutterCommandRunner to pass these dependencies. It also adds tests across multiple platforms to verify that local engine options are propagated to the build system environment and generated configuration files. Feedback is provided to use fileSystem.path.join in assemble_test.dart to prevent test failures on Windows due to hardcoded path separators.
Passes ToolContext directly to Artifacts.getLocalEngine and uses object destructuring to extract the necessary dependencies.
vashworth
requested review from
okorohelijah
and removed request for
cbracken
September 21, 2026 21:49
okorohelijah
reviewed
Oct 6, 2026
…_propagation # Conflicts: # packages/flutter_tools/test/commands.shard/hermetic/build_web_test.dart
…ependencies Avoids importing ToolContext into Artifacts to prevent an import cycle and decouples the Artifacts type from the DI container.
… Linux config-only test Formats test files with the updated cached Dart SDK (3.14.0-309.0.dev) to satisfy format.dart and runs pub get prior to flutter build linux --config-only --no-pub in build_linux_config_only_test.dart so generated_plugins.cmake exists regardless of test execution order.
okorohelijah
approved these changes
Oct 7, 2026
This was referenced Oct 8, 2026
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.
Description
Adds tests verifying that local engine options specified via CLI flags or artifacts are properly propagated across
flutter_toolscommands and dependency injection bootstrapping, addressing #192361 (comment). Also refactorsArtifacts.getLocalEngineto makecache,fileSystem,operatingSystemUtils,platform, andprocessManagerrequired named parameters, eliminating ambientglobals.*fallbacks.Related Issues
Tests
packages/flutter_tools/test/commands.shard/hermetic/(assemble_test.dart,build_ios_test.dart,build_linux_test.dart,build_macos_test.dart,build_web_test.dart,build_windows_test.dart)packages/flutter_tools/test/general.shard/(bundle_builder_test.dart,context/dependency_injection_test.dart,runner/flutter_command_runner_test.dart)packages/flutter_tools/test/integration.shard/build_linux_config_only_test.dart