[flutter_tools] Remove web specific vm_service handlers, move handler tests to single location#80440
Merged
fluttergithubbot merged 4 commits intoflutter:masterfrom Apr 18, 2021
Conversation
jonahwilliams
commented
Apr 14, 2021
| } | ||
|
|
||
| @override | ||
| Future<bool> debugDumpApp() async { |
Contributor
Author
There was a problem hiding this comment.
All of these now use the same implementation as the "regular" resident runner.
jonahwilliams
commented
Apr 14, 2021
| return devFS.create(); | ||
| } | ||
|
|
||
| Future<void> debugDumpApp() async { |
Contributor
Author
There was a problem hiding this comment.
Inlined all of these into the resident runner.
jonahwilliams
commented
Apr 14, 2021
| /// Invoke an RPC extension method on the first attached ui isolate of the first device. | ||
| // TODO(jonahwilliams): Update/Remove this method when refactoring the resident | ||
| // runner to support a single flutter device. | ||
| Future<Map<String, dynamic>> invokeFlutterExtensionRpcRawOnFirstIsolate( |
Contributor
Author
There was a problem hiding this comment.
inlined into the remaining use site in daemon.dart
Contributor
Author
|
Rebased on the previous PR, now this is only the test re-arrangement and the removal of the web specific vm service delegation |
jmagman
approved these changes
Apr 17, 2021
Member
jmagman
left a comment
There was a problem hiding this comment.
Thanks, this was much easier to review in two pieces.
LGTM!
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The goal of this PR is to move the resident runners closer to a state where enough of the implementation is shared to enable 1) profile/release/debug autodetect for
flutter attachand 2) simultaneous connections to web and non-web devices. I also wanted to remove the vast amounts of duplicated test logic due to the web and non-web resident runners having different service extension impls as well as remove the mocks from the terminal handler test and re-imagine it as a fairly high level interaction test.Changes in resident_runner.dart:
ResidentHandlerswhich contains the vm service delegation, make it easier to share with the web impl for now. This required exposing Logger and FileSystem as protected members.FlutterDeviceclass. Now that the logic is in a single place it doesn't make as much sense to split it up.getVM's isolate list instead of listing the flutter views. The flutter view RPC is not supported on the web, but since there is only ever one isolate we can use the VM list. This required exposing the TargetPlatform field on FlutterDevice, which was already part of the constructor.Changes in resident runner testing:
Changes in resident_web_runner testing:
Changes in terminal_handler testing:
Updated the test set up to remove the use of mocks, and to extend most test cases to include a web case.
clean ups: