-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Build command dependency injection #114383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # packages/flutter_tools/test/commands.shard/hermetic/build_web_test.dart
@@ -15,8 +15,10 @@ import 'build.dart'; | |||
|
|||
class BuildWebCommand extends BuildSubCommand { | |||
BuildWebCommand({ | |||
required super.logger, | |||
required FileSystem fileSystem, | |||
required bool verboseHelp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a further cleanup, I think this can be required super.verboseHelp,
and then we don't have to explicitly call super(verboseHelp: verboseHelp)
@@ -16,6 +16,7 @@ import 'build.dart'; | |||
/// A command to build a macOS desktop target through a build shell script. | |||
class BuildMacosCommand extends BuildSubCommand { | |||
BuildMacosCommand({ | |||
required super.logger, | |||
required bool verboseHelp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need the filesystem override on line 199? And how does the global XcodeProjectInterpreter
get called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhh, ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are no overrides throughout all the test files here that can be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No 😕, wanted to remove the fs but it is used on FlutterCommand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:'( ok, thanks for checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
///
).