Capture JSON RPC errors that presently get swallowed#31584
Merged
dnfield merged 4 commits intoflutter:masterfrom Apr 25, 2019
Merged
Capture JSON RPC errors that presently get swallowed#31584dnfield merged 4 commits intoflutter:masterfrom
dnfield merged 4 commits intoflutter:masterfrom
Conversation
liyuqian
reviewed
Apr 24, 2019
| } | ||
|
|
||
| void _unhandledJsonRpcError(dynamic error, dynamic stack) { | ||
|
|
Contributor
There was a problem hiding this comment.
Is this intentionally blank?
Contributor
Author
There was a problem hiding this comment.
No, forgot to save. Will fix tonight
Contributor
Author
|
@jonahwilliams any idea on the builderOptions failures? Do we need to pin build_runner? |
Contributor
|
We can pin it for now and I can handle rolling the changes |
| const Map<String, String> _kManuallyPinnedDependencies = <String, String>{ | ||
| // Add pinned packages here. | ||
| 'flutter_gallery_assets': '0.1.8', // See //examples/flutter_gallery/pubspec.yaml | ||
| 'build_modules': '1.0.9', // TODO(jonahwilliams): migrate https://cirrus-ci.com/task/5747941259083776 |
Contributor
Author
|
This spiked our tech debt benchmark for package deps, but didn't add any new deps... |
Contributor
Author
|
It's because of the pinned dependency. That will go back down once we unpin the dep. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
json_rpc_2 swallows exceptions. This can hide bugs in our callbacks, e.g. type conversion issues, which can result in an RPC call not doing what is expected.
This change hooks into a new parameter available that informs the caller of unhandled exceptions. For now, we just print them and assert(false). For Fuchsia debug protocol, we only print them.
Related Issues
Fixes #28531
Tests
The tests for this functionality exist upstream in the PR I wrote for json_rpc_2.
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.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?