Repository navigation
fix(ssr): align named export function call stacktrace column with Node - #22829
sapphi-red merged 2 commits into
Conversation
commented
Jun 30, 2026
|
/ecosystem-ci run |
@vitejs/plugin-legacy
vite
commit: |
commented
Jun 30, 2026
|
📝 Ran ecosystem CI on
✅ marko, module-federation, analogjs, vite-environment-examples, quasar, qwik, laravel, vite-plugin-svelte, vite-plugin-vue, vite-plugin-cloudflare, sveltekit, vite-plugin-react, vite-plugin-pwa, vike, unocss, vite-setup-catalogue, vitepress, vite-plugin-rsc, vuepress, waku |
left a comment
There was a problem hiding this comment.
So cool!
Had struggled to understand the idea, so I had AI visualize the mapping 😃 https://artifacts.hiro18181.workers.dev/vite-pr-22829
| // V8 anchors the call-site stack frame of a parenthesized callee to | ||
| // the argument list `(`. Absorb everything from the callee up to the | ||
| // first argument (or the call's end for an empty argument list) into | ||
| // the replaced chunk so that `(` maps back to the start of the callee, | ||
| // keeping stack trace columns aligned with Node (which points to the | ||
| // callee). Optional calls (`?.()`) are excluded because Node itself | ||
| // anchors them to the `(`. See #19625. |
There was a problem hiding this comment.
Not sure how much trusted but AI said this adjustment happens here https://github.com/v8/v8/blob/0c7a9d0d8c05491e8053d7259a1a6b11e75c1907/src/parsing/parser-base.h#L4037-L4043
The comment calls out the case of IIFE function(){}(), but parenthesized case seems to also hit this case.
Also, it looks like bun isn't affected (and already correct) since they already have different callee mapping approach that doesn't rely on argument list (.
commented
Jul 6, 2026
Cool! What prompt did you use to generate this page? |
I have some some personal skills in https://github.com/hi-ogawa/dotfiles/tree/main/skills and this was mostly a combination of ho-review then ho-artifact. I used opencode with anthropic/claude-opus-4-8. Full session transcript is https://gist.github.com/hi-ogawa/8f306058811eab7bd85244aeaab3fc6e and I prompted this after review:
|
commented
Jul 7, 2026
|
I confirmed the change on Vitest vitest-dev/vitest#10722. It looks like CI is failing for other reason between 8.0.11 to 8.1.3 though vitest-dev/vitest#10723 |
commented
Jul 7, 2026
commented
Jul 8, 2026
|
Turns out Vitest CI fails is because of a Vitest bug. It's being fixed in vitest-dev/vitest#10724. |
…cktrace-column-with-node
commented
Jul 9, 2026
|
/ecosystem-ci run |
commented
Jul 9, 2026
|
📝 Ran ecosystem CI on
✅ nuxt, sveltekit, laravel, quasar, vike, vite-environment-examples, module-federation, analogjs, marko, storybook, qwik, unocss, vuepress, vite-plugin-react, vite-plugin-vue, vite-plugin-cloudflare, vite-plugin-svelte, vite-plugin-pwa, vite-setup-catalogue, waku, vite-plugin-rsc, vitepress |
It seems we can align this behavior by tweaking some mappings.
fixes #19625