A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix(gate): a diagnostic's identity is the same on every machine
esengine3becafa070b2
diff --git a/tools/baselines/sdk-test-types.json b/tools/baselines/sdk-test-types.jsonindex bf63cb125..5b9f8d0cb 100644--- a/tools/baselines/sdk-test-types.json+++ b/tools/baselines/sdk-test-types.json@@ -34,7 +34,7 @@"TS2739|Type '{ componentNamed: () => AnyComponentDef; resourceAt: () => undefined; }' is missing the following properties from type 'AotAddresses': resourceWriteBack, payloadRows, sendEvent, releasePayloads": 1},"tests/api-baseline-rules.test.ts": {- "TS7016|Could not find a declaration file for module '../../tools/lib/apiSnapshot.mjs'. 'D:/estella/tools/lib/apiSnapshot.mjs' implicitly has an 'any' type.": 1+ "TS7016|Could not find a declaration file for module '../../tools/lib/apiSnapshot.mjs'. 'tools/lib/apiSnapshot.mjs' implicitly has an 'any' type.": 1},"tests/asset-refcounter-integration.test.ts": {"TS2739|Type '{ textureHandles: Map<any, any>; materialHandles: Map<any, any>; fontHandles: Map<any, any>; releaseCallbacks: never[]; missing: never[]; }' is missing the following properties from type 'SceneAssetResult': meshHandles, environmentHandles, scope": 1@@ -51,7 +51,7 @@"TS2739|Type '{ name: \"web\" | \"wechat\"; fetch: () => Promise<any>; readFile: () => Promise<ArrayBuffer>; readTextFile: () => Promise<string>; fileExists: () => Promise<false>; ... 6 more ...; createAudioBackend: () => WebAudioBackend | MiniGameAudioBackend; }' is missing the following properties from type 'PlatformAdapter': devicePixelRatio, getStorageItem, setStorageItem, removeStorageItem, clearStorage": 1},"tests/binding-surface.test.ts": {- "TS7016|Could not find a declaration file for module '../../build-tools/tasks/native.js'. 'D:/estella/build-tools/tasks/native.js' implicitly has an 'any' type.": 1+ "TS7016|Could not find a declaration file for module '../../build-tools/tasks/native.js'. 'build-tools/tasks/native.js' implicitly has an 'any' type.": 1},"tests/camera-bounds.test.ts": {"TS2551|Property 'getRegistry' does not exist on type 'MockModule'. Did you mean 'Registry'?": 1@@ -216,7 +216,7 @@"TS2345|Argument of type 'Map<BuiltinComponentDef<TilemapLayerData>, { visible: boolean; opacity: number; }>' is not assignable to parameter of type 'Map<symbol, any>'.": 1},"tests/shader-twins.test.ts": {- "TS7016|Could not find a declaration file for module '../../tools/gen-shader-twins.mjs'. 'D:/estella/tools/gen-shader-twins.mjs' implicitly has an 'any' type.": 1+ "TS7016|Could not find a declaration file for module '../../tools/gen-shader-twins.mjs'. 'tools/gen-shader-twins.mjs' implicitly has an 'any' type.": 1},"tests/sideModuleHost.test.ts": {"TS7053|Element implicitly has an 'any' type because expression of type 'SideModuleId' can't be used to index type 'Record<BuiltinSideModuleId, SideModuleDescriptor>'.": 1diff --git a/tools/check-sdk-test-types.mjs b/tools/check-sdk-test-types.mjsindex 64cb5fbb2..0d66333b3 100644--- a/tools/check-sdk-test-types.mjs+++ b/tools/check-sdk-test-types.mjs@@ -59,6 +59,17 @@ if (run.status !== 0 && !/error TS\d+/.test(output)) {fail('tsc did not run.', output.slice(0, 2000));}+const ROOT_POSIX = ROOT.split(path.sep).join('/');++/**+ * The checkout's own location, out of the message text. TS7016 and friends name+ * the resolved module by ABSOLUTE path, so an identity built from the raw+ * message is per-machine: a baseline banked on one checkout reported three+ * phantom "new" diagnostics on every other one, including CI, where the same+ * three were already banked under a different prefix.+ */+const unroot = (msg) => msg.split(`${ROOT_POSIX}/`).join('').split(ROOT_POSIX).join('');+/** file → "TSxxxx|message" → count. Continuation lines are indented; skip them. */const current = {};const LINE = /^(.+?)\((\d+),(\d+)\): error (TS\d+): (.*)$/;@@ -66,7 +77,7 @@ for (const line of output.split(/\r?\n/)) {const m = LINE.exec(line);if (!m) continue;const file = m[1].split(path.sep).join('/');- const key = `${m[4]}|${m[5]}`;+ const key = `${m[4]}|${unroot(m[5])}`;(current[file] ??= {});current[file][key] = (current[file][key] ?? 0) + 1;}