-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
[tool] Support --flavor
option for flutter install
.
#114048
Conversation
e3a50c2
to
b2b6700
Compare
Suggest also adding |
fc54eab
to
13d60f2
Compare
You added Chris as me as reviewers, mark this ready for review when it's actually ready for review 🙂 |
I didn't test this, but here's a possible way to test install in the devicelab await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async {
await flutter(
'install',
options: <String>['--flavor', 'paid'],
);
await flutter(
'install',
options: <String>['--flavor', 'paid', '--uninstall-only'],
);
final StringBuffer stderr = StringBuffer();
await evalFlutter(
'install',
canFail: true,
stderr: stderr,
options: <String>['--flavor', 'bogus'],
);
final String stderrString = stderr.toString();
if (!stderrString.contains('install failed, bogus flavor not found')) {
print(stderrString);
return TaskResult.failure('Should not succeed with bogus flavor');
}
}); |
); | ||
|
||
final String stderrString = stderr.toString(); | ||
if (!stderrString.contains('install failed, bogus flavor not found')) { |
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 isn't the correct error message I'm sure, you'll have to run it.
9898ded
to
5be125d
Compare
packages/flutter_tools/test/commands.shard/hermetic/install_test.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/commands.shard/hermetic/install_test.dart
Outdated
Show resolved
Hide resolved
040913e
to
cde4f66
Compare
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 LGTM once you're done testing and the .ci.yaml bringup
changes are reverted (though if you want to keep it for the Windows one, that makes sense).
@@ -1690,6 +1690,7 @@ targets: | |||
task_name: fast_scroll_large_images__memory | |||
|
|||
- name: Linux_android flavors_test | |||
bringup: true |
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.
If the intention of this was to test in this PR, then you also need to remove presubmit: false
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.
Can we even run devicelab tests presubmit?
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.
We run Mac_ios hot_mode_dev_cycle_macos_target__benchmark
and Linux_android hot_mode_dev_cycle_linux__benchmark
so there's capacity.
But what I said doesn't make any sense, adding bringup
wouldn't make it run in this PR, removing bringup would do that.
@keyonghan suggested @a-wallen do this, but I didn't see that since their conversation was resolved and hidden.
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
* 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)
This caused |
* 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)
* Alphabetize setup calls * Add --flavor as an option for install * Add verbose logging in install command * Test that flavors build succeeds with proper flavor and fails with bogus one. * Remove unused import * The import was used... * SQUASH * Add flavor install test * Rename test * Add flavors install integration tests * correct error message * remove unused imports * Delete copy test * update test target * Refactor mechanism to read buildInfo * Remove unused import * Set affected test targets to bringup: true Co-authored-by: a-wallen <[email protected]>
* Alphabetize setup calls * Add --flavor as an option for install * Add verbose logging in install command * Test that flavors build succeeds with proper flavor and fails with bogus one. * Remove unused import * The import was used... * SQUASH * Add flavor install test * Rename test * Add flavors install integration tests * correct error message * remove unused imports * Delete copy test * update test target * Refactor mechanism to read buildInfo * Remove unused import * Set affected test targets to bringup: true Co-authored-by: a-wallen <[email protected]>
* 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)
flutter install
previously forced users to specify the--flavor
option if flavors were configured for a flutter project, but didn't provide the option, to begin with ( see #99607 ). We could solve this by either:flutter install
on a project with flavors configured. Users will have to use install the application binary with the--use-application-binary
flag.--flavor
as an option - search for that flavor's binary and install it.Fixes #99607
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.