Crafter.Build/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 59fc9501f1
fix: key PCM and project.so freshness on content, not installed mtimes
std.pcm was rebuilt when it was older than std.cppm, and project.so when
it was older than the crafter-build executable. Both inputs are installed
files, and an OSTree deployment (the Flatpak) gives every installed file
mtime 0: std.cppm and the executable always looked older than the cache,
so a clang bump would never rebuild std.pcm and a crafter-build update
would never recompile project.so. clang crashes on a PCM from another
compiler instead of reporting it, so the failure would have been a
backtrace on the user's first build after an update.

Each artifact now has a one-line stamp beside it. std.pcm's covers the
precompile command and the module source's bytes, which also catches a
libc++ update under the same clang. project.so's covers the crafter-build
version, the toolchain key, the module source stamp and the compile
command; project.cpp's and the pre-dependency artifacts' mtimes remain
inputs, since those live next to it with real timestamps. The module
source stamp stands in for the executable: project.so resolves Crafter::
symbols from the running binary, so only declarations matter, and an
implementation-only rebuild of crafter-build no longer recompiles it.
The std.pcm stamp folds into the module cache stamp, so a rebuilt
std.pcm rebuilds the PCMs that import it.

The cache directory carries the toolchain key
(<target>-<march>-<clang version>-<hash>), so a compiler bump starts
cold instead of handing the new clang PCMs it will crash on. LoadProject
and Build() now derive the directory from the same StdPcmDir. Old
<target>-<march> directories are left behind; `clean` never touched the
cache and still does not.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-02 23:18:09 +02:00
..
CleanProject feat(lint): const-local and constexpr-constant rules 2026-07-31 00:50:48 +02:00
CompilerWarning refactor: drop Windows host support 2026-10-02 22:03:34 +02:00
ConcurrentCacheRace linting 2026-07-23 01:24:42 +02:00
ConcurrentDependencyReset linting 2026-07-23 01:24:42 +02:00
DependencyLink linting 2026-07-23 01:24:42 +02:00
HelloWorld linting 2026-07-23 01:24:42 +02:00
HostCacheSourceStamp fix: key the host PCM cache on source content, add clean, hash project args 2026-07-30 17:43:09 +00:00
HostCacheToolchainKey fix: key PCM and project.so freshness on content, not installed mtimes 2026-10-02 23:18:09 +02:00
IncrementalHeaderChange test: header-change incrementality across every compile path 2026-07-31 11:11:49 +00:00
IncrementalInterfaceChange fix: re-resolve module imports before checking staleness 2026-07-30 17:12:24 +00:00
Lint feat(lint): const-local and constexpr-constant rules 2026-07-31 00:50:48 +02:00
ModuleInterface linting 2026-07-23 01:24:42 +02:00
ProjectDependency fix: let a project file ask whether it is the top-level project 2026-10-02 22:02:40 +02:00
RunSingleTestExit linting 2026-07-23 01:24:42 +02:00
ShaderCompile linting 2026-07-23 01:24:42 +02:00
StandardArgs fix: key the host PCM cache on source content, add clean, hash project args 2026-07-30 17:43:09 +00:00
StaticLib linting 2026-07-23 01:24:42 +02:00
TestRunnerSpec feat(toolchain): resolve the compiler in one place 2026-10-02 22:26:31 +02:00
ToolchainResolve fix(toolchain): pass -L as well as an rpath for a toolchain outside /usr 2026-10-02 23:18:07 +02:00
TransitiveInterfaceChange test change 2026-08-05 05:49:42 +02:00
VariantId fix: key the host PCM cache on source content, add clean, hash project args 2026-07-30 17:43:09 +00:00
VersionFlag feat(toolchain): resolve the compiler in one place 2026-10-02 22:26:31 +02:00
WasiBrowserRuntime linting 2026-07-23 01:24:42 +02:00
WasmVariants linting 2026-07-23 01:24:42 +02:00