Let flutter attach find the service port by looking through old logs again#53153
Merged
fluttergithubbot merged 5 commits intoflutter:masterfrom Mar 25, 2020
Merged
Let flutter attach find the service port by looking through old logs again#53153fluttergithubbot merged 5 commits intoflutter:masterfrom
fluttergithubbot merged 5 commits intoflutter:masterfrom
Conversation
blasten
suggested changes
Mar 24, 2020
packages/flutter_tools/test/general.shard/android/adb_log_reader_test.dart
Show resolved
Hide resolved
packages/flutter_tools/test/general.shard/android/adb_log_reader_test.dart
Show resolved
Hide resolved
blasten
reviewed
Mar 24, 2020
| '-v', | ||
| 'time', | ||
| '-s', | ||
| 'flutter' |
blasten
reviewed
Mar 24, 2020
| await device.getLogReader(), | ||
| // If it's an Android device, attaching relies on past log searching | ||
| // to find the service protocol. | ||
| await device.getLogReader(includePastLogs: device is AndroidDevice), |
xster
added a commit
that referenced
this pull request
Mar 25, 2020
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
We stopped listening to old logs in #45743 to fix #45732.
Finding the service port through old logs was the primary way of letting
flutter attachwork for apps that already started in full-flutter or add-to-app cases.Let flutter logs continue to default to showing logs from the present. But for flutter attach specifically, let it read through old logs.
Related Issues
Fixes #52975
Tests
I added the following tests:
Unit test.
More test case in integration test.
Tested microbenchmarks still work #45732
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.
This breaks g3. For subclasses of DeviceLogReader, you can do nothing if includePastLogs = true.