-
Notifications
You must be signed in to change notification settings - Fork 6k
Return null in Future<WebSocketChannel>.catchError handler #23101
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
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.
🙌 Is the CI failure unrelated? It is unfamiliar to me. |
It looks unrelated but the failed code is too close to the code that's changed in this PR. Would you mind rebasing the PR to kick off another build? Filed flutter/flutter#73601 to look into this later. I've never seen this error. |
Rebased, but I cannot see what the error is in the logs... |
I'm checking if other PRs are affected right now. The error is:
|
Looked at a few PRs and none are failing in the same way. I'm going to patch in your change and try it locally. |
Ok, so I was able to reproduce this error without your change (sorry, took me a while to restore my engine dev environment on my laptop). In my case, I didn't have iOS 13.0 simulator installed. After I installed it everything worked. Perhaps what's happening is one of our macOS machines is missing iOS 13.0 simulator, although that doesn't explain why your PR specifically is failing and so consistently too. I'd say let's merge your PR, and if it causes trouble we'll revert it. |
Excellent @yjbanov would you mind merging? Thanks! |
The engine team is fighting some fires right now. To avoid making the situation worse, I'll wait for engine sheriff's green light before landing. |
Thanks much! |
Description
A
Future<T>.catchError
'sonError
handler should be a function which returnsFutureOr<T>
. This has not been statically verified because the type signature ofonError
cannot be expressed. The analyzer will soon start reporting this as an error, as part of dart-lang/sdk#35825.In the code below, a
return;
statement is found in anonError
handler for aFuture<WebSocketChannel>
.Related Issues
Tests
I added no tests:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.Reviewer Checklist
Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.