这是indexloc提供的服务,不要输入任何密码
Skip to content

Source map tracing fixes #2402

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

Merged
merged 6 commits into from
Oct 28, 2022
Merged

Source map tracing fixes #2402

merged 6 commits into from
Oct 28, 2022

Conversation

jridgewell
Copy link
Contributor

A few changes:

  • Fixes the SSR traced error output, which incorrectly used the generated path instead of the found file.
  • Removes the [disk-fs-name] part of traced filenames
    every frame (and I'm assuming a lot of those frames share a source)
  • Fixes another bug in the sourcemap crate that returned a token on a previous line
  • Fixes a bug where we attempt to strip a fingerprint hash from a SourceAssetVc holding a input's pre-transpiled source map, which doesn't contain a fingerprint
  • Removes the Mutex wrapper for tracing source maps, since they aren't mutable.
    • Hopefully this'll reduce contention when the client, which sends an individual request for

There's still some more optimizations that we can do, specifically to avoid round trip serialize->deserialize for tracing that I'm working on. I just couldn't finish that tonight.

@jridgewell jridgewell requested a review from alexkirsz October 27, 2022 04:14
@vercel
Copy link

vercel bot commented Oct 27, 2022

@jridgewell is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
examples-designsystem-docs 🔄 Building (Inspect) Oct 28, 2022 at 4:31AM (UTC)
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Oct 28, 2022 at 4:31AM (UTC)
4 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Oct 28, 2022 at 4:31AM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Oct 28, 2022 at 4:31AM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Oct 28, 2022 at 4:31AM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Oct 28, 2022 at 4:31AM (UTC)

If the input file was pre-transformed (eg, a file in `node_modules`), then we would find that input source map. Those don't have the hash fingerprint, and stripping it would panic.
This removes the `[disk-fs-name]` portion of the source path, so that traced error stacks point directly at the file. It also means the console log paths are clickable!
@jridgewell jridgewell requested a review from a team as a code owner October 28, 2022 04:19
@gaspar09 gaspar09 merged commit 45ab78a into vercel:main Oct 28, 2022
@jridgewell jridgewell deleted the sourcemap-fixes branch October 28, 2022 04:31
jridgewell added a commit to vercel/next.js that referenced this pull request Mar 10, 2023
sokra pushed a commit to vercel/next.js that referenced this pull request Mar 13, 2023
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
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.

4 participants