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

Research usability of --enable-source-maps #2050

Open
cspotcode opened this issue Sep 2, 2023 · 1 comment
Open

Research usability of --enable-source-maps #2050

cspotcode opened this issue Sep 2, 2023 · 1 comment
Labels
research Needs design work, investigation, or prototyping. Implementation uncertain.

Comments

@cspotcode
Copy link
Collaborator

cspotcode commented Sep 2, 2023

In the past, node's built-in --enable-source-maps had bugs / missing features and performance issues. But things may have changed.

In #2009 @isaacs found that @cspotcode/source-map-support is not working in node 20. Maybe to do with installing it in both the loader and main threads, or to do with the source cache populating in one thread but the stack traces being mapped in another?


https://discord.com/channels/508357248330760243/933130253692436560/1147324780920459344

Correctness test and benchmark

Here is a benchmark that I used to compare the correctness and performance of different sourcemap implementations.
https://github.com/cspotcode/source-map-performance-demo#example-output
evanw/node-source-map-support#122 (comment)

Async frames rendering incorrectly

nodejs/node#42417

async stack frames weren't rendering correctly
I linked the test & benchmark as evidence

Callsite vs callee function names

Some sourcemappers map function names to the callsite (wrong), not the callee. Meaning stack frames show the wrong function name
jestjs/jest#12786 (comment)

However, @cspotcode/source-map-support also doing this wrong?

@cspotcode cspotcode added the research Needs design work, investigation, or prototyping. Implementation uncertain. label Sep 2, 2023
@cspotcode cspotcode changed the title Confirm usability of --enable-source-maps Research usability of --enable-source-maps Sep 2, 2023
@cspotcode
Copy link
Collaborator Author

I updated the benchmark results: https://github.com/cspotcode/source-map-performance-demo#example-output

Async stack traces still render incorrectly. But node 19 resolved the performance issue with large sourcemaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research Needs design work, investigation, or prototyping. Implementation uncertain.
Projects
None yet
Development

No branches or pull requests

1 participant