Build command dependency injection#114383
Conversation
# Conflicts: # packages/flutter_tools/test/commands.shard/hermetic/build_web_test.dart
| BuildWebCommand({ | ||
| required super.logger, | ||
| required FileSystem fileSystem, | ||
| required bool verboseHelp, |
There was a problem hiding this comment.
as a further cleanup, I think this can be required super.verboseHelp, and then we don't have to explicitly call super(verboseHelp: verboseHelp)
| class BuildMacosCommand extends BuildSubCommand { | ||
| BuildMacosCommand({ | ||
| required super.logger, | ||
| required bool verboseHelp, |
There was a problem hiding this comment.
this can be required super.verboseHelp,
| final BuildCommand command = BuildCommand( | ||
| androidSdk: FakeAndroidSdk(), | ||
| buildSystem: TestBuildSystem.all(BuildResult(success: true)), | ||
| fileSystem: MemoryFileSystem.test(), |
There was a problem hiding this comment.
do we need the filesystem override on line 199? And how does the global XcodeProjectInterpreter get called?
There was a problem hiding this comment.
In general, are we able to remove any of the context overrides from the tests after this change?
There was a problem hiding this comment.
Yes we still need those overrides because BuildIOSCommand is not yet migrated. As for the XcodeProjectInterpreter comes all the way from lib/src/ios/mac.dart
There was a problem hiding this comment.
there are no overrides throughout all the test files here that can be removed?
There was a problem hiding this comment.
No 😕, wanted to remove the fs but it is used on FlutterCommand
There was a problem hiding this comment.
:'( ok, thanks for checking
christopherfujino
left a comment
There was a problem hiding this comment.
LGTM, thanks for this one!
# Conflicts: # packages/flutter_tools/test/commands.shard/hermetic/build_macos_test.dart
* a84e369 Revert "Allow Flutter golden file tests to be flaky (#114450)" (flutter/flutter#114902) * 1725a26 Switch the way we retrieve the vm_service_port from /hub to iquery, on device. (flutter/flutter#114834) * 7020f59 [tool] Support `--flavor` option for `flutter install`. (flutter/flutter#114048) * 9797d5f [macOS] Refactor the `flutter run` macOS console output test (flutter/flutter#114645) * 530324d Build command dependency injection (flutter/flutter#114383) * 69a542d Apply multidex config in kotlin dsl gradle file (flutter/flutter#114660) * 92f10ed match error statements without relying on volatile human-readable descriptions (flutter/flutter#114922) * d3dcd7d Update `CircleAvatar` to support Material 3 (flutter/flutter#114812)
* a84e369 Revert "Allow Flutter golden file tests to be flaky (#114450)" (flutter/flutter#114902) * 1725a26 Switch the way we retrieve the vm_service_port from /hub to iquery, on device. (flutter/flutter#114834) * 7020f59 [tool] Support `--flavor` option for `flutter install`. (flutter/flutter#114048) * 9797d5f [macOS] Refactor the `flutter run` macOS console output test (flutter/flutter#114645) * 530324d Build command dependency injection (flutter/flutter#114383) * 69a542d Apply multidex config in kotlin dsl gradle file (flutter/flutter#114660) * 92f10ed match error statements without relying on volatile human-readable descriptions (flutter/flutter#114922) * d3dcd7d Update `CircleAvatar` to support Material 3 (flutter/flutter#114812)
* a84e369 Revert "Allow Flutter golden file tests to be flaky (#114450)" (flutter/flutter#114902) * 1725a26 Switch the way we retrieve the vm_service_port from /hub to iquery, on device. (flutter/flutter#114834) * 7020f59 [tool] Support `--flavor` option for `flutter install`. (flutter/flutter#114048) * 9797d5f [macOS] Refactor the `flutter run` macOS console output test (flutter/flutter#114645) * 530324d Build command dependency injection (flutter/flutter#114383) * 69a542d Apply multidex config in kotlin dsl gradle file (flutter/flutter#114660) * 92f10ed match error statements without relying on volatile human-readable descriptions (flutter/flutter#114922) * d3dcd7d Update `CircleAvatar` to support Material 3 (flutter/flutter#114812)
* a84e369 Revert "Allow Flutter golden file tests to be flaky (#114450)" (flutter/flutter#114902) * 1725a26 Switch the way we retrieve the vm_service_port from /hub to iquery, on device. (flutter/flutter#114834) * 7020f59 [tool] Support `--flavor` option for `flutter install`. (flutter/flutter#114048) * 9797d5f [macOS] Refactor the `flutter run` macOS console output test (flutter/flutter#114645) * 530324d Build command dependency injection (flutter/flutter#114383) * 69a542d Apply multidex config in kotlin dsl gradle file (flutter/flutter#114660) * 92f10ed match error statements without relying on volatile human-readable descriptions (flutter/flutter#114922) * d3dcd7d Update `CircleAvatar` to support Material 3 (flutter/flutter#114812)
* update flutter build command * update tests * fix analyze suggestions
* update flutter build command * update tests * fix analyze suggestions
* a84e369 Revert "Allow Flutter golden file tests to be flaky (#114450)" (flutter/flutter#114902) * 1725a26 Switch the way we retrieve the vm_service_port from /hub to iquery, on device. (flutter/flutter#114834) * 7020f59 [tool] Support `--flavor` option for `flutter install`. (flutter/flutter#114048) * 9797d5f [macOS] Refactor the `flutter run` macOS console output test (flutter/flutter#114645) * 530324d Build command dependency injection (flutter/flutter#114383) * 69a542d Apply multidex config in kotlin dsl gradle file (flutter/flutter#114660) * 92f10ed match error statements without relying on volatile human-readable descriptions (flutter/flutter#114922) * d3dcd7d Update `CircleAvatar` to support Material 3 (flutter/flutter#114812)
Part of: #107607
The missing BuildSubCommands will be added in a different PR to minimize breakeges with g3
Pre-launch Checklist
///).