Use "Service" instead of "_Service" for VM service protocol >= 3.22#1844
Use "Service" instead of "_Service" for VM service protocol >= 3.22#1844
Conversation
| this.observatory.on("Extension", (event: VMEvent) => this.handleExtensionEvent(event)); | ||
| this.observatory.on("Debug", (event: VMEvent) => this.handleDebugEvent(event)); | ||
|
|
||
| const serviceStreamName = this.capabilities.serviceStreamIsPublic ? "Service" : "_Service"; |
There was a problem hiding this comment.
This looks good - good to be able to switch on the service protocol version in general.
I think you'd also be good just subscribing to both streams and ignoring error results.
Perhaps add a todo: to remove the switch at some point?
There was a problem hiding this comment.
I think you'd also be good just subscribing to both streams and ignoring error results.
That was my original plan, but making sure that if they both failed we had something in the log to debug (without always writing logs for the one that failed) was messy, so I figured I may as well do it properly (it seems likely we'll need this if changes for breakpoints across multiple debuggers happen anyway).
Perhaps add a todo: to remove the switch at some point?
Rather than TODOs all around the place I've started periodically reviewing the Capabilities classes (of which there are now quite a few now) and chopping properties for old things out and fixing the related code appropriately. Unless they're adding complexity, I've been trying to keep them around a while though - this one seems pretty trivial (fun fact: most days Dart Code still has hundreds of users using SDK v1.24 🙃!)
|
The red builds are all from Flutter Web test failures.. they've always been a bit flaky on the CIs - though seems worse lately. They're all passing locally for this branch so I'm confident nothing is broken by it. I'll work on making them better when I do work to make them run on the unforked version. |
@devoncarew would you mind scanning these changes? (Select Hide whitespace changes in the diff to avoid seeing loads of changes due to indent change!).
Fixes #1843.
Also see dart-archive/vm_service_drivers#251.