Skip to content

Convert JavaScript uncaught exception stack traces to Dart stacks #1603

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
May 18, 2022

Conversation

jason-simmons
Copy link
Contributor

@jason-simmons jason-simmons commented May 10, 2022

@annagrin
Copy link
Contributor

Thank you Jason! It would be great to add a test so we don't introduce regressions in the future.

@jason-simmons
Copy link
Contributor Author

Added a test

Copy link
Contributor

@annagrin annagrin left a comment

Choose a reason for hiding this comment

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

Thanks Jason! Left some comments to cover more cases.

There are a few things we need to do:

  • address CR comments
  • update dwds version to 14.0.2-dev in changelog.md and pubspec.yaml (14.0.1 is in the making right now, so changing to 14.0.2-dev would be the easiest to resolve conflicts)
  • add a description of the fix to the changelog.md
  • run dart run build_runner build
  • commit and submit your changes

@annagrin
Copy link
Contributor

Thanks Jason!

Let me know if you would like to me to take over at any point if it gets too complicated.

@jason-simmons
Copy link
Contributor Author

Added handling for the VSCode case, and a check in an existing test for stack trace mapping on an exception pause event.

PTAL

@jason-simmons jason-simmons force-pushed the bug_101888 branch 3 times, most recently from 0ff5051 to fbaee5f Compare May 12, 2022 01:17
@annagrin
Copy link
Contributor

annagrin commented May 13, 2022

Thanks Jason, this is fantastic! Merging with master should resolve the test failures (you might need to update the version to 14.0.3-dev and rerun dart run build_runner build, since the master version has updated, apologies, it seems like you stumbled into a cluster of dwds releases around dart SDK stable update...).

@jason-simmons
Copy link
Contributor Author

I rebased this on master and it's passing CI now.

However, when I run dart run build_runner build it modifies various JavaScript files that look unrelated. In particular, the output seems to be undoing some of the changes that were made by 8426dc5

Should I add the build_runner output to this PR, or can the PR be landed as is? Or do I need to do something else (such as running build_runner with a different version of the Dart SDK)?

@annagrin
Copy link
Contributor

I am not sure what's happening, could be that your dart version is not the same as Elliott's, or some packages are outdated. I'll try to fix that part and append to your PR.

@annagrin
Copy link
Contributor

annagrin commented May 18, 2022

@jason-simmons I built your PR and it seems to not generate anything bad, just some changes in the compiled client.js due to latest changes in dart2js. LGTM to check this in after the test pass!

@annagrin annagrin self-requested a review May 18, 2022 00:02
Copy link
Contributor

@annagrin annagrin left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you Jason for your contribution!

@annagrin
Copy link
Contributor

I am going to merge this, thank you Jason!

@annagrin annagrin merged commit ab0018b into dart-lang:master May 18, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[web] exception stack trace with javascript files instead of dart On break on exception, displayed stack trace is unmapped JavaScript, not Dart.
2 participants