SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 16 Rust

fix(compile): create code cache when importing JSON or Wasm modules (#34614)

A compiled binary that imports a JSON or Wasm module never wrote its
code cache to disk, so every run recompiled from scratch instead of reusing
the cache the first run was supposed to create.

The first-run code cache strategy counts each cache lookup and only
serializes once a matching number of produced cache entries come back.
The embedded module loader requested a code cache for every module type,
including JSON and Wasm, but deno_core drops the code cache for those
types and never reports one back, so the pending counter never reached zero
and the cache was never written. The fix only requests a code cache for
JavaScript modules, which are the only ones that produce one. A
deno_core test guards the contract that JSON modules do not trigger the
code-cache-ready callback.

Closes #31766
B
Bartek Iwańczuk committed
10f660f40cb177738723652d227c6025a6bad2b3
Parent: ec6dbb5
Committed by GitHub <noreply@github.com> on 6/1/2026, 7:44:05 AM