0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

test(compiler-test-utils): Rsbuild dev harness reads each compile before Rspack drops it

With Start's real runtime (real-start-build) the Rsbuild dev tests of
start-plugin-core became flaky (baseline ac3f8d5ac9: 8 of 8 runs of
tests/rsbuild/dev-server.test.ts green; real-start-build 953b24f622: 1
failure in 6; the merge: 1 in 11). Two causes, both in the shared harness:

- "Rsbuild failed to compile the app: Unable to access compilation with
  id = CompilationId(5) now": `onDevCompileDone` runs after the compile
  ended; when a later compile already started (Start rewrites its server
  fn resolver module, which the watcher reports), Rspack has dropped the
  compilation and reading `builtModules` throws. The harness now skips
  such a report: the running compile's end reports instead.
- "the client's hot update has the edited client code ...": `label` never
  showed up within 10 s. `hotUpdates()` read the hot-update chunks from
  disk, skipping those a later compile removed. It now keeps their code,
  read in each environment compiler's `done` hook while the compilation
  is alive.

`hotUpdates()` keeps its contract (the hot-update chunks of the compiles
since the last `edit()` began). 8 of 8 runs green afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-10-18 15:40:34 +02:00
commit fddb59070c
No known key found for this signature in database