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

Fix StitchError stack traces in node #77

Conversation

UnicodeSnowman
Copy link
Member

@UnicodeSnowman UnicodeSnowman commented Nov 14, 2017

  • Add babel-plugin-transform-builtin-extend
  • Subclassing builtin types needs special treatment by babel
    • Without this plugin, in a node environment, a subclass of Error does not actually behave like a true subclass, which manifests itself via a missing stacktrace when a StitchError is thrown

More details here

We've been seeing a handful of flaky tests in evergreen caused by uncaught promises. Because of the missing stacktraces, these errors are super hard to track down. This should help with that.

Before

screen shot 2017-11-14 at 3 20 48 pm

After

screen shot 2017-11-14 at 3 20 11 pm

@UnicodeSnowman
Copy link
Member Author

test failures are from currently-broken code-exec branch

@UnicodeSnowman UnicodeSnowman force-pushed the fix-stitcherror-stacktraces-in-node branch 3 times, most recently from 98a85a9 to ddafc16 Compare November 14, 2017 22:21
@UnicodeSnowman UnicodeSnowman changed the base branch from code-exec to master November 14, 2017 22:21
Copy link
Contributor

@edaniels edaniels left a comment

Choose a reason for hiding this comment

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

Might need to rebase changes onto master again to get evergreen working.

* Add `babel-plugin-transform-builtin-extend`
* Subclassing builtin types needs special treatment by babel
  * Without this plugin, in a node environment, a subclass of Error does not actually behave like a true subclass, which manifests itself via a missing stacktrace when a StitchError is thrown

More details [here](babel/babel#3083)
@UnicodeSnowman UnicodeSnowman force-pushed the fix-stitcherror-stacktraces-in-node branch from ddafc16 to b1378f5 Compare November 15, 2017 15:32
@UnicodeSnowman UnicodeSnowman merged commit 760c920 into mongodb:master Nov 15, 2017
@UnicodeSnowman UnicodeSnowman deleted the fix-stitcherror-stacktraces-in-node branch November 15, 2017 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants