Problem
jit_cache_all_tests (in utils/CMakeLists.txt) prewarms the JIT cache by JIT-compiling every file under tests/. Unlike the dastest sweeps, it does not consult tests/.das_test's can_visit_folder module gate. Instead it carries a hand-maintained skip list:
COMMAND ${UTIL_BIN_DIR}/jit.exe ${PROJECT_SOURCE_DIR}/tests --parallel 0 ... \
--exclude gc --exclude dasHV --exclude dasPUGIXML --exclude dasSQLITE \
--exclude stbimage --exclude live_host --exclude audio --exclude strudel --exclude minfft
So the set of module-gated test dirs is duplicated: once in tests/.das_test (has_module(...)) and again here.
Impact
Adding a new module-gated test directory requires updating both places. Forgetting the --exclude entry reds the per-PR build Debug lane: those lanes build a minimal daslang (optional modules — audio/pugixml/sqlite/stbimage/minfft — are only enabled in extended_checks), so the prewarm hits require <module> and fails with error[20605]: missing prerequisite '<module>' — even though the actual interp/JIT/AOT test sweeps pass cleanly (they consult .das_test and skip the dir).
Most recently hit by tests/minfft in #3255: the dir was correctly gated in .das_test and registered in tests/aot/CMakeLists.txt, but the missing --exclude minfft reddened build (linux, 64, Debug, none). Fixed there by adding the exclude, but the duplication remains a latent trap for the next module-gated dir.
Proposal
Teach the prewarm to respect .das_test so the skip list lives in one place — e.g. have jit.exe load and apply can_visit_folder the way dastest does (skip a folder when its required module isn't registered in the running binary), or otherwise filter by built-module availability. Then drop the per-module --exclude entries.
Caveat: gc is excluded here for a different reason (GC-semantics tests are interp-only under -jit — heap_collect can't see jitted-frame locals), not module availability. .das_test already encodes that (gc skipped under --use-aot/-jit), so a unification should preserve the gc case rather than dropping it.
References
Problem
jit_cache_all_tests(inutils/CMakeLists.txt) prewarms the JIT cache by JIT-compiling every file undertests/. Unlike the dastest sweeps, it does not consulttests/.das_test'scan_visit_foldermodule gate. Instead it carries a hand-maintained skip list:So the set of module-gated test dirs is duplicated: once in
tests/.das_test(has_module(...)) and again here.Impact
Adding a new module-gated test directory requires updating both places. Forgetting the
--excludeentry reds the per-PRbuildDebug lane: those lanes build a minimal daslang (optional modules — audio/pugixml/sqlite/stbimage/minfft — are only enabled inextended_checks), so the prewarm hitsrequire <module>and fails witherror[20605]: missing prerequisite '<module>'— even though the actual interp/JIT/AOT test sweeps pass cleanly (they consult.das_testand skip the dir).Most recently hit by
tests/minfftin #3255: the dir was correctly gated in.das_testand registered intests/aot/CMakeLists.txt, but the missing--exclude minfftreddenedbuild (linux, 64, Debug, none). Fixed there by adding the exclude, but the duplication remains a latent trap for the next module-gated dir.Proposal
Teach the prewarm to respect
.das_testso the skip list lives in one place — e.g. havejit.exeload and applycan_visit_folderthe way dastest does (skip a folder when its required module isn't registered in the running binary), or otherwise filter by built-module availability. Then drop the per-module--excludeentries.Caveat:
gcis excluded here for a different reason (GC-semantics tests are interp-only under-jit—heap_collectcan't see jitted-frame locals), not module availability..das_testalready encodes that (gcskipped under--use-aot/-jit), so a unification should preserve thegccase rather than dropping it.References
skills/writing_tests.mdalready documents the current manual-sync requirement ("thejit_cache_all_testsprewarm target … does NOT consult it — its--excludelist mirrors the skips manually and must be updated in the same change").