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
fix(build): sequence staged artifacts before compilation, and stop hiding std entries
Three fixes from the first CI round.
Module partitions. Replacing a package's compile edges with stage edges also
removes the ordering those compile edges carried. A consumer that imports `pkg`
has `pkg`'s BMI in its dyndep and nothing else — the partition BMI `pkg:part` was
reached only because `pkg`'s own compile edge depended on it. With independent
stage edges ninja may start the consumer while the partition is still unstaged:
error: failed to find module file for module 'mcpplibs.cmdline:options'
macOS CI hit it; Linux won the race, which is why it is now an invariant rather
than a scheduling accident. Every staged artifact becomes an ORDER-ONLY
prerequisite of every non-staged edge, aggregated through one phony so no edge
repeats the list (mcpp#274: long ninja lines are how a 50781-character command
line blew past cmd.exe's 8191 limit). Order-only is the right strength — the real
content dependencies are still declared where they always were, so a changed BMI
still invalidates its consumers; this adds sequencing, not dirtiness. Verified
locally on both GCC and Clang against mcpplibs.cmdline, which has a `:options`
partition.
Ages were computed against the wrong epoch. file_time_type is
std::chrono::file_clock, whose epoch is not the Unix epoch, so `cache list`
printed "74509d ago". Converted through clock_cast.
Test fallout, all of it real:
- 22_doctor_cache_publish asserted `cache list` was empty after `mcpp self
doctor`, which precompiles a std module. That assertion only held because the
old `cache list` walked dep entries and skipped std ones — and hiding them is
how 16 GB of duplicated std BMIs went unnoticed. The empty-cache check moved
ahead of doctor; the std entry is now asserted to be visible, with a bound on
the age column that would have caught the epoch bug.
- 40_llvm_bmi_cache used `--no-cache` to force a cold first build, then expected
the second build to reuse it. `--no-cache` is now an alias for `--cache=off`,
which means neither read NOR write — so it left nothing to reuse. The test's
actual intent (fresh MCPP_HOME is already cold) is now what it says, and it
additionally asserts zero compile edges and the partition sequencing. The
semantic tightening is called out in the CHANGELOG: a mode named `off` that
still writes the cache would not be defensible.
- 98_reflection_import_std grepped $MCPP_HOME/bmi, the pre-v1 root. It passed
locally purely because this machine still holds 26 GB of legacy entries, one of
which happened to record -freflection — a false green of exactly the kind the
plan warned about. It and two siblings now select the std entry by CONTENT
instead of `find | head -1`, which is no longer well-defined: one MCPP_HOME can
hold several std identities now, and that is the point.
0 commit comments