-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Convert expression evaluation exceptions to errors #54916
Merged
fluttergithubbot
merged 7 commits into
flutter:master
from
annagrin:annagrin/convert_eval_exceptions_to_errors
Apr 17, 2020
Merged
Convert expression evaluation exceptions to errors #54916
fluttergithubbot
merged 7 commits into
flutter:master
from
annagrin:annagrin/convert_eval_exceptions_to_errors
Apr 17, 2020
Conversation
This file contains 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
fluttergithubbot
added
team
Infra upgrades, team productivity, code health, technical debt. See also team: labels.
tool
Affects the "flutter" command-line tool. See also t: labels.
labels
Apr 16, 2020
grouma
reviewed
Apr 16, 2020
packages/flutter_tools/test/general.shard/web/web_expression_compiler_test.dart
Outdated
Show resolved
Hide resolved
annagrin
force-pushed
the
annagrin/convert_eval_exceptions_to_errors
branch
from
April 16, 2020 01:37
87526f2
to
dfe4205
Compare
packages/flutter_tools/test/general.shard/web/web_expression_compiler_test.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/general.shard/web/web_expression_compiler_test.dart
Outdated
Show resolved
Hide resolved
You'll need to use |
jonahwilliams
approved these changes
Apr 16, 2020
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.
LGTM with nits
grouma
approved these changes
Apr 16, 2020
annagrin
force-pushed
the
annagrin/convert_eval_exceptions_to_errors
branch
from
April 16, 2020 19:22
0cbb00f
to
a4edbde
Compare
annagrin
force-pushed
the
annagrin/convert_eval_exceptions_to_errors
branch
from
April 16, 2020 21:53
a4edbde
to
4195c61
Compare
jonahwilliams
approved these changes
Apr 17, 2020
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.
Still LGTM
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
Expression evaluation for web currently throws an exception if frontend server has an internal error. Convert those exceptions to errors instead so IDEs can display or ignore them better, depending on where the expression was evaluated directly or via hovering over (or other scenarios).
This change is part of three changes (flutter, webdev, sdk) needed to convert exceptions to errors, all of which are needed to fix #54520
DWDS version 3.0.3 that propagates the errors instead of exceptions:
better scope detection and error handling in expression evaluator dart-lang/webdev#954
Updated the dependency to match.
SDK change (in progress) to convert some exceptions to errors so recoverable failures in expression evaluation do not crash frontend server:
https://dart-review.googlesource.com/c/sdk/+/143660
Related Issues
#54520
Tests
I added the following tests:
packages/flutter_tools/test/general.shard/web/web_expression_compiler_test.dart
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
Did any tests fail when you ran them? Please read Handling breaking changes.