X Tutup
The Wayback Machine - https://web.archive.org/web/20210913222048/https://github.com/flutter/flutter/pull/66696
Skip to content
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

[flutter_tools] flutter logs no longer requires supported device #66696

Merged
merged 3 commits into from Oct 3, 2020

Conversation

@jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Sep 25, 2020

Description

Flutter logs should not attempt to filter the device list based on the current project, because it does not require a current project. Also fix disabled polling test

Fixes #47996
Fixes #63550

@@ -428,7 +435,7 @@ abstract class PollingDeviceDiscovery extends DeviceDiscovery {

Future<List<Device>> pollingGetDevices({ Duration timeout });

Future<void> startPolling() async {
void startPolling() {

This comment has been minimized.

@jonahwilliams

jonahwilliams Sep 25, 2020
Author Member

Most of these methods do not need to be async - this made it much easier to fix the disabled test

@@ -66,7 +66,7 @@ class DaemonCommand extends FlutterCommand {

typedef DispatchCommand = void Function(Map<String, dynamic> command);

This comment has been minimized.

@jonahwilliams

jonahwilliams Sep 28, 2020
Author Member

These changes just make the async APIs sync like the underlying code

@@ -34,7 +34,7 @@ class LogsCommand extends FlutterCommand {

@override
Future<FlutterCommandResult> verifyThenRunCommand(String commandPath) async {
device = await findTargetDevice();
device = await findTargetDevice(includeUnsupportedDevices: true);

This comment has been minimized.

@jonahwilliams

jonahwilliams Sep 28, 2020
Author Member

The only change for the log command

@@ -138,26 +138,26 @@ void main() {
});

group('PollingDeviceDiscovery', () {
testUsingContext('startPolling', () async {
await FakeAsync().run((FakeAsync time) async {
testUsingContext('startPolling', () {

This comment has been minimized.

@jonahwilliams

jonahwilliams Sep 28, 2020
Author Member

This test was disabled, now it works again yay

@jonahwilliams
Copy link
Member Author

@jonahwilliams jonahwilliams commented Sep 28, 2020

@Hixie as the primary user of flutter logs would you like to review? 😃

@jonahwilliams jonahwilliams requested review from jmagman and removed request for jmagman Oct 1, 2020
@@ -66,7 +66,7 @@ class DaemonCommand extends FlutterCommand {

typedef DispatchCommand = void Function(Map<String, dynamic> command);

typedef CommandHandler = Future<dynamic> Function(Map<String, dynamic> args);
typedef CommandHandler = FutureOr<dynamic> Function(Map<String, dynamic> args);

This comment has been minimized.

@Hixie

Hixie Oct 2, 2020
Member

FWIW, I would strongly prefer we never use FutureOr. It leads to all kinds of issues later.

This comment has been minimized.

@Hixie

Hixie Oct 2, 2020
Member

not quite sure i understand where this ends up mattering

This comment has been minimized.

@jonahwilliams

jonahwilliams Oct 3, 2020
Author Member

Removed, its not necessary

@Hixie
Hixie approved these changes Oct 2, 2020
Copy link
Member

@Hixie Hixie left a comment

LGTM module the FutureOr. But I suspect that means something else major has to change...?

@jonahwilliams
Copy link
Member Author

@jonahwilliams jonahwilliams commented Oct 3, 2020

Fixed the FutureOr issue :) , NBD

@jonahwilliams
Copy link
Member Author

@jonahwilliams jonahwilliams commented Oct 3, 2020

Landing to kick the tree - the last red test passed but the build status is stuck

@jonahwilliams jonahwilliams merged commit 1bea512 into flutter:master Oct 3, 2020
25 of 26 checks passed
25 of 26 checks passed
@flutter-dashboard
flutter-build Flutter build is currently broken. Please do not merge this PR unless it contains a fix to the broken build.
Details
@flutter-github-sync
Google testing Google testing passed!
Details
@flutter-dashboard
Linux analyze
Details
@flutter-dashboard
Linux build_tests
Details
@flutter-dashboard
Linux customer_testing
Details
@flutter-dashboard
Linux firebase_abstract_method_smoke_test
Details
@flutter-dashboard
Linux firebase_android_embedding_v2_smoke_test
Details
@flutter-dashboard
Linux firebase_release_smoke_test
Details
@flutter-dashboard
Linux fuchsia_precache
Details
@flutter-dashboard
Linux gradle_r8_test
Details
@flutter-dashboard
Linux tool_tests
Details
@flutter-dashboard
Linux web_integration_tests
Details
@flutter-dashboard
Mac customer_testing
Details
@flutter-dashboard
Mac tool_tests
Details
@wip
WIP Ready for review
Details
@flutter-dashboard
Windows customer_testing
Details
@flutter-dashboard
Windows tool_tests
Details
@cirrus-ci
analyze-linux Task Summary
Details
@googlebot
cla/google All necessary CLAs are signed
@cirrus-ci
customer_testing-linux Task Summary
Details
@cirrus-ci
deploy_gallery-linux Task Summary
Details
@cirrus-ci
deploy_gallery-macos Task Summary
Details
@flutter-dashboard
flutter-gold All golden file tests have passed.
Details
@cirrus-ci
tool_tests-commands-linux Task Summary
Details
@cirrus-ci
tool_tests-general-linux Task Summary
Details
@cirrus-ci
web_integration_tests Task Summary
Details
@jonahwilliams jonahwilliams deleted the jonahwilliams:fix_clean branch Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
X Tutup