Repository navigation
Commit 4e9c63a
authored
[flutter_tools] Add device log streaming support to DeviceService and ExtensionBackedDevice (flutter#194964)
Adds device log streaming support for tool-extension-backed target
devices (`flutter logs` and `flutter run` console output):
- Adds `startLogStreamMethod` (`device.startLogStream`),
`stopLogStreamMethod` (`device.stopLogStream`),
`logEntryNotificationMethod` (`device.logEntry`), `lineKey`,
`startLogStream`, `stopLogStream`, and `emitLogLine` to `DeviceService`
(`package:flutter_tools_extension`).
- Implements `startLogStream` and `stopLogStream` on
`ExtensionDeviceClient`, introduces `ExtensionDeviceLogReader`, and
updates `ExtensionBackedDevice.getLogReader` to cache and dispose a
per-device log reader.
- Updates `LogsCommand.runCommand()` to skip
`applicationPackages.getPackageForPlatform` when `targetPlatform ==
TargetPlatform.unsupported` (such as custom-platform extension devices).
- Adds hermetic unit and isolate RPC tests in
`test/general.shard/extension_protocol/extension_device_test.dart` and
an end-to-end `LogsCommand` integration test in
`test/commands.shard/hermetic/tool_extensions_device_test.dart`.
Part of flutter#190755
Part of flutter#190750
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.1 parent 3490ec8 commit 4e9c63a
5 files changed
Lines changed: 1030 additions & 38 deletions
File tree
- packages/flutter_tools
- lib/src
- commands
- experimental
- packages/flutter_tools_extension/lib/src
- test
- commands.shard/hermetic
- general.shard/extension_protocol
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
0 commit comments