Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat: Source maps

オープン
#2,935 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@aleksanderkatan がすでに取り組んでいます。

2026年8月27日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
TypeScript
スター
3.3k
フォーク
135
平均マージ
4日 1時間
マージ済み PR(30日)
64

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

software-mansion/TypeGPU のほかの issue

software-mansion/TypeGPU の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。