Uh oh!
There was an error while loading. Please reload this page.
process: add source-map support to stack traces - #29564
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
benjamingr
commented
Sep 15, 2019
Code LGTM with devsnek's comments addressed. I'll also play with this locally a bit and see if it behaves consistently. Thanks for this this is a big usability improvement in core for a lot of our users! (Note this will probably have to be semver-major and with a CITGM run because it changes all errors and some libraries parse them) |
bcoe
commented
Sep 15, 2019
@benjamingr do you think a major is necessary, even though someone will opt in with Open to other people's thinking on this. |
ljharb
commented
Sep 15, 2019
While behind an experimental flag, I’d expect no changes to precipitate a major. |
joyeecheung
commented
Sep 16, 2019
If it's opt-in via flags I don't think this need to be semver-major. BTW I think it's fine to just use |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
benjamingr
commented
Sep 16, 2019
Sorry for being unclear: I do not think this needs to be major with the flag but I do eventually think Node.js should turn this on by default and that change should be semver-major. +1 for Joyee's idea of doing
|
Uh oh!
There was an error while loading. Please reload this page.
fe2171b to
3ee0717Comparebcoe
commented
Sep 22, 2019
@LinusU I'm wondering if you have any feedback, as we start to build this out; I imagine you've bumped into some interesting edge cases building source-map-support. |
8238a97 to
ffddaf1Compare
This uses SourceMap.js (shipped with V8) and the cache developed in #28960, to add source-map support to stack traces.
How it works:
If you run your program with the flag
--source-map-support, and a source-map is found and cached for a file, stack traces are annotated with both the original and transpiled source positions:Providing both the original and transpiled source if possible.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesThis grows out of continuing conversation here.
And relies on #28960, which I would ideally like to land first.(landed).