-
Notifications
You must be signed in to change notification settings - Fork 83
Fix for listening to custom streams in DWDS. #2011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks! This change LGTM (it's what I tested locally and definitely worked), but you may want the opinion of someone more familiar with DWDS than I 🙂 |
Thanks! Could you add a test case? Here are where we have test cases for the other stream event types: webdev/dwds/test/chrome_proxy_service_test.dart Lines 1973 to 1998 in 85f35d4
|
LGTM pending Elliott's approval |
|
||
test('custom stream', () async { | ||
expect( | ||
() => service.streamListen('VM'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We handle the VM
stream (which is why the test is failing)
Fixes Dart-Code/Dart-Code#4414 (comment)
When listening to a stream, DDS does a streamListen on the VMService. If the VMService, doesn't recognize the stream it will respond with
kInvalidParams
. This lets DDS know that the stream is nonstandard, so it can handle the events for that stream on it's own.This PR changes DWDS to behave like the VMService in this regard. Fixing this will allow us to streamListen on custom streams using DWDS.