You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update wgsl errors to all go through a report function that returns never (so that we can later use eval there)
Document the feature
Make the error link clickable
Try to report source for all items in stack trace
We could fake-include the errorous file in the stack trace, like WESL does. Something like this:
constfileUrl=`${window.location.origin}/src/main.ts?raw`;constsourceMap={version: 3,file: 'fakeErrorFile.js',sources: [fileUrl],mappings: `AA${toVLQ(/* line */11)}${toVLQ(/* char */4)}`,};constbase64Map=btoa(String.fromCharCode(...newTextEncoder().encode(JSON.stringify(sourceMap))),);consterrFile=`\throw new Error(':c');//# sourceMappingURL=data:application/json;base64,${base64Map}//# sourceURL=apps/typegpu-docs/src/examples/simple/triangle/index.ts`;eval(errFile);
(RFC, extra work outside of original scope) Handle device errors.
WESL provides WeslDevice that takes generated source maps into account. We could do the same.
We should probably start with just catching and re-throwing errors. This may allow for easier RN debugging.
This will require us to collect another source map of generated WGSL.
Activity
pullfrog commentedon Aug 27, 2026