[flutter_tools] remove flutter view cache - #56223
Conversation
|
nvm, i misread the code, we waited forever lol. I wonder if instead we should wait for isolate runnable? Otherwise I could patch wait forever back in, seems bad to do polling if we don't need to. |
|
I think I don't quite follow, but waiting forever here sounds in line with the policy against timeouts. |
|
I added back the poll forever logic |
| if (views.isNotEmpty || returnEarly) { | ||
| return views; | ||
| } | ||
| await Future<void>.delayed(delay); |
There was a problem hiding this comment.
This previously had a 'This is taking a long time' message. Should that also be restored, or is this already wrapped in a status spinner thing?
There was a problem hiding this comment.
Ahh, status spinner is a good idea. Let me add that instead of adding a print
|
Status spinner added, tests updated - PTAL |
|
The Linux failure is a flake that I cannot rerun |
jmagman
left a comment
There was a problem hiding this comment.
LGTM, let's see if the attach test goes green.
This reverts commit 209bdcb.
Description
Fixes #56194
Remove caching of FlutterView. Perhaps the FlutterView RPC might return an empty list if the VM is not quite up yet? We had some old logic to poll the flutter views RPC for up to 200ms. That doesn't seem like a great approach, so instead we could forgo it entirely and trust that either the views come up before the developer tries to interact, or we crash.
https://github.com/flutter/flutter/blob/stable/packages/flutter_tools/lib/src/vmservice.dart#L1070