The vendored WebGPU CanvasKit has no producer, and a fresh checkout silently renders with a different build
packages/core/vendor/canvaskit-webgpu/ holds a CanvasKit build the app renders with, but nothing in the repository creates it and .gitignore:78 keeps it out of git. A fresh clone or git worktree add never has it.
bun install cannot supply it either: the npm canvaskit-wasm package ships bin/, bin/full/ and bin/profiling/, and no WebGPU build. The only references to the directory are reads in vite/canvaskit-assets.ts.
Two things make the gap hard to notice.
The warning names a fix that cannot work. vite/canvaskit-assets.ts:10 prints:
[copy-canvaskit-wasm] Missing source (run `bun install`): …/packages/core/vendor/canvaskit-webgpu/canvaskit.wasmRunning bun install changes nothing, because npm has no such artifact.
The fallback is silent. serveCanvasKitWasm (vite/canvaskit-assets.ts:30) serves the non-WebGPU canvaskit.wasm when the vendored file is absent, so the app starts and draws — with a different Skia build than everyone else's. Canvas snapshot tests then fail for a reason that looks like a code regression. In one worktree this produced about 27 mismatches in tests/e2e/canvas/** that had nothing to do with the change under test.
Suggested direction:
- Make the producer part of the repository: a script under
tools/that builds or fetches the artifact, reproducible from a clean checkout, the waytools/brand/derives icons. - Point the warning at that command instead of
bun install. - Fail loudly, or surface a visible notice, where the WebGPU build is required, rather than quietly substituting another build — silent substitution is what costs the debugging time.
- Record the provenance in
packages/core/AGENTS.md; today it is tribal knowledge.
Reproduce with git worktree add ../probe origin/master && cd ../probe && bun install && bun run dev, then look for the warning and compare a canvas snapshot run against a checkout that has the directory.
Source: open-pencil/open-pencil