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
{{ message }}
Repository navigation
Commit c28b8d1
Browse filesBrowse the repository at this point in the historyBrowse files
T3 (#724 W3/W4/W5): a device source is not a compile unit; a failed build
program's own diagnostic survives; emit writes no project file
W3 (src/build/plan.cppm): the compile-unit loop now skips
SourceKind::Device graph units, so build.ninja carries no dead cxx_object
edge for a rule-claimed device source, and compile_commands.json / the S1
document agree without their own filter (unit_invocations already excluded
only NASM; nothing else needed to change). The source stays in `watch` and
still reaches the package's build program through MCPP_DEVICE_SOURCES,
since both read the manifest's sources glob directly, not plan.compileUnits.
Checked every other consumer of plan.compileUnits (prepare/plan.cpp's
dependency-cache collection keys by path, not by index, so it is unaffected
beyond a smaller artifact set for a package with device sources).
W4: a package whose build program failed under `emit`'s plan_only records
MCPP_BUILD_DATABASE_PROGRAM_FAILED and applies none of its directives
(state.cppm: new PrepareState::programFailedPackages, set at both call
sites in target_side.cpp and features.cpp). The device-source orphan check
in target_side.cpp now skips such a package outright, instead of reading
every device source as unclaimed and failing the whole member. Also: notes
a phase recorded before prepare_build's own failing return are no longer
silently dropped (driver.cpp: a thread_local sink in the same per-run-sink
style as mcpp::build::refusal, exported as
mcpp::build::take_notes_on_failure); cmd_build.cppm's emit failure path
folds any such note into the one diagnostic SPEC-005 R5.2 allows a wholly-
failed member (path stays the member's mcpp.toml, exactly one entry), so
the true cause is not lost behind a downstream symptom without violating
that invariant. hasProgram's existing exists(build.mcpp) check is now
correct by construction, since a failed program's package never reaches it.
W5 (src/build/prepare/xlings.cpp): ensure_project_index_dir's two calls
under a private work_dir are collapsed into the one call the
ownerRoot==workRoot branch always made, targeting workRoot in every case.
Previously the runtime-environment half (deps/subos/workspace) went to
runtimeSelection.ownerRoot, which is always the real project root
regardless of emit's private work_dir -- so `emit build-database` wrote
<root>/.mcpp/.xlings.json into a project that declares [xlings] deps.
SPEC-005: R3.7 names device sources beside NASM units (both absent from S1
and compile_commands.json, for different reasons -- NASM is a compile unit
excluded from export, a device source is never a compile unit at all). R5.2
gains the sentence that a check whose premise is a build program's
directives does not run for a package whose program failed in this pass.
R2.1 needed no change.
Tests: e2e 808 (device source: no dead ninja edge, absent from both
databases, and the rule still compiles it and the build still runs), e2e
809 (a device source plus a build.mcpp that does not compile: PROGRAM_FAILED
with path build.mcpp, no device-source mention, package still described),
e2e 817 (688's project-tree digest repeated on a stub-xlings fixture with
[xlings] deps: byte-identical tree, no .mcpp/.xlings.json, no write-project
effect, and the private work directory does gain one naming the
dependency). Each fails against the released 2026.9.27.1 binary and passes
on the fresh build. Full regression: all 15 emit/build-database e2e
scripts, 798, and four more that exercise the compile-unit loop (asm/GAS,
NASM, object-path-collision, multi-module) all still pass; `mcpp test`
(130 unit tests) passes.
0 commit comments