Skip to content

Conversation

@xster
Copy link
Member

@xster xster commented Mar 24, 2020

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 attach work 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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.
    This breaks g3. For subclasses of DeviceLogReader, you can do nothing if includePastLogs = true.

@fluttergithubbot fluttergithubbot added c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. labels Mar 24, 2020
@xster xster requested review from blasten and jmagman March 24, 2020 07:09
@xster xster requested a review from blasten March 24, 2020 23:24
'-v',
'time',
'-s',
'flutter'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: trailing comma

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),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link

@blasten blasten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter attach doesn't connect after the flutter module's VM/engine started Some microbenchmarks stopped sending data

5 participants