Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat: Source maps

Aperta
#2,935 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@aleksanderkatan ci sta già lavorando.

Dal 27/8/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

MACROTASK

The goal of this macrotask is to link to an appropriate line and character when 'use gpu' functions turns out to be invalid.

  • Add a node wrapper for Identifier, so that it can be sourcemapped (#2973)
  • Create a function for extracting sourcemaps from tinyest (#3023)
  • Accept source maps in transpileFn (#2975)
  • Collect source maps in plugin (#2942)
  • Include filename in metadata (#3039)
  • Update wgsl errors to all go through a report function that returns never (so that we can later use eval there)
  • Include source of error in WGSL errors
  • Document the feature
  • Make the error link clickable
    We could fake-include the errorous file in the stack trace, like WESL does. Something like this:
const fileUrl = `${window.location.origin}/src/main.ts?raw`;

const sourceMap = {
  version: 3,
  file: 'fakeErrorFile.js',
  sources: [fileUrl],
  mappings: `AA${toVLQ(/* line */ 11)}${toVLQ(/* char */ 4)}`,
};

const base64Map = btoa(
  String.fromCharCode(...new TextEncoder().encode(JSON.stringify(sourceMap))),
);

const errFile = `\
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.

Lingua principale
TypeScript
Stelle
3.3k
Fork
135
Merge medio
4g 1h
PR unite (30g)
64

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di software-mansion/TypeGPU

Tutte le issue di software-mansion/TypeGPU

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.