Skip to content
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

Conversation

annagrin
Copy link
Contributor

@annagrin annagrin commented Apr 16, 2020

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

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.
    • I wrote a design doc: https://flutter.dev/go/template Replace this with a link to your design doc's short link
    • I got input from the developer relations team, specifically from: Replace with the names of who gave advice
    • I wrote a migration guide: Replace with a link to your migration guide

@fluttergithubbot 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
@annagrin annagrin force-pushed the annagrin/convert_eval_exceptions_to_errors branch from 87526f2 to dfe4205 Compare April 16, 2020 01:37
@jonahwilliams
Copy link
Member

You'll need to use flutter update-packages --force-upgrade to update dwds`

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits

@annagrin annagrin force-pushed the annagrin/convert_eval_exceptions_to_errors branch from 0cbb00f to a4edbde Compare April 16, 2020 19:22
@annagrin annagrin force-pushed the annagrin/convert_eval_exceptions_to_errors branch from a4edbde to 4195c61 Compare April 16, 2020 21:53
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM

@fluttergithubbot fluttergithubbot merged commit b69b2a8 into flutter:master Apr 17, 2020
@annagrin annagrin deleted the annagrin/convert_eval_exceptions_to_errors branch April 22, 2020 19:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team Infra upgrades, team productivity, code health, technical debt. See also team: labels. tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find kernel2js compiler
5 participants