You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump the build-cache epoch: a corrected key cannot tell a poisoned entry
from a trustworthy one
The previous commit made fill_package_config read the realised environment,
but a corrected derivation does not make an entry written under the old,
wrong one safe to keep. An entry is poisoned exactly when its recorded key
and its actual compiled inputs already disagreed at write time, and the
package most likely to still produce an unchanged key after the fix is the
one this same PR newly exempts from the realisation: a kernel-abi provider
inferred into c-environment = "platform" now has an empty
privateBuild.cflags, so its new key is computed from nothing -- matching
its old key, which was also computed from nothing, while the object on disk
was compiled WITH the substitution. No cheaper mechanism distinguishes a
pre-fix entry from a post-fix one, so kCacheEpoch moves (2 -> 3): every
existing ~/.mcpp/build-cache/v1 entry is orphaned unconditionally, one cold
rebuild for everyone, rather than trust a key equality that is wrong for
exactly the entries that matter most.
Also adds CacheKey.EveryPrivateBuildBroadcastFieldReachesTheKey, a durable
guard for the class of defect rather than only this one instance of it:
PackageRoot::privateBuild (UsageRequirements) is the engine's own broadcast
channel, and every one of its members -- today includeDirs, includeDirsAfter,
cflags, cxxflags, asmflags, ldflags, modules -- has to move the cache key,
because the key's only job is to describe what reaches the compiler. This
predates the c-abi wave (targetSideUsage's own broadcast, and __openkal__,
had the identical exposure before [c-abi] existed); the two fields nothing
broadcasts into yet (ldflags, modules) are asserted uncovered on purpose,
with an explicit instruction to flip that assertion in the same change that
adds their broadcast.
0 commit comments