mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-09 17:11:46 +08:00
Each npm-static fixpoint round loaded the program with new frontend services, so every load started new tsc-ts processes and parsed the libraries and unchanged package files again. The Node frontend now keeps one FrontendServices per compile, as the native frontend does, and program hosts serve up to four loads: a host its load closes goes back to an idle list, and the next load rebinds it to its own file system shadow and sends its first snapshot with invalidateAll, so the server reads every file again and reuses only identical text. Loads alive at once hold different hosts; timed hosts are never reused. SCRIPTC_TS7_HOST_LOADS=1 restores a new host per load. A rebound host answers as a new host for changed shadows, hidden files, dropped in-memory files and on-disk edits (unit test), npm builds emit identical IR with and without reuse (parity test), and pi's loads after the scout take 1-3 s less each, with identical coverage diagnostics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>