Skip to content

feat: Include sourcemap in errors - #3282

Draft
aleksanderkatan wants to merge 11 commits into
feat/filename-in-metadatafrom
feat/include-sourcemap-in-errors
Draft

aleksanderkatan wants to merge 11 commits into
feat/filename-in-metadatafrom
feat/include-sourcemap-in-errors

Conversation

@aleksanderkatan

@aleksanderkatan aleksanderkatan commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

I replaced 3 example throws with fail calls (I delegate the rewrite of remaining ones to another PR).
At this point, the source is only present in the message.
I'll try to include it in the actual stack trace in further PRs.

With vite config:

export default defineConfig({
  plugins: [typegpu({unstable_sourceMaps: true})],
  server: {
    forwardConsole: {
      unhandledErrors: true,
      logLevels: ['error', 'warn'],
    },
  },
});

The link is clickable in VSCode's console, and takes to the correct location.
Updates with hot reload as expected.

image

@aleksanderkatan aleksanderkatan mentioned this pull request Oct 27, 2026
3 of 10 tasks
@aleksanderkatan
aleksanderkatan force-pushed the feat/include-sourcemap-in-errors branch from 9f68d34 to e48c001 Compare October 28, 2026 11:26
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/tgpu-gen@cf7d452faffe89d7e87dc82b5db1509b07258ebe
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@cf7d452faffe89d7e87dc82b5db1509b07258ebe
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@cf7d452faffe89d7e87dc82b5db1509b07258ebe
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@cf7d452faffe89d7e87dc82b5db1509b07258ebe
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@cf7d452faffe89d7e87dc82b5db1509b07258ebe

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Resolution Time Benchmark

---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [1.12, 2.31, 5.08, 7.54, 9.31, 12.43, 28.51, 31.01]
  line [1.09, 2.17, 4.51, 7.00, 8.44, 13.44, 29.46, 28.94]
  line [1.00, 2.16, 4.70, 7.54, 8.52, 15.05, 27.71, 28.97]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.34, 0.58, 0.83, 1.03, 1.23, 1.37, 1.61, 1.78]
  line [0.31, 0.55, 0.74, 0.91, 1.21, 1.30, 1.53, 1.76]
  line [0.33, 0.57, 0.81, 0.99, 1.28, 1.35, 1.63, 1.67]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [1.04, 2.29, 4.60, 8.61, 14.41, 30.75, 62.15, 127.22]
  line [0.91, 2.50, 4.18, 8.00, 14.63, 28.60, 63.29, 125.16]
  line [0.88, 2.49, 4.13, 8.06, 14.78, 29.42, 61.85, 128.67]
Loading

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 Decreased ➖ Unchanged 🔴 Increased (max 0.28%) ❔ Unknown
0 343 12 0

No notable changes.

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

This branch has not been deployed

No deployments
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.

1 participant