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: refuse [toolchain] system; only mcpp-managed toolchains build
The host-dependence rule is not uniform across axes, and the split is the
point rather than an inconsistency.
THE TOOLCHAIN IS MCPP'S OWN CONTRACT. Everything mcpp promises — that
`import std` is available, that the runtime closure is computable, that two
machines and CI produce the same build — is a statement about a compiler mcpp
resolved and can identify. A compiler taken from PATH makes every one of those
unverifiable, so `[toolchain] … = "system"` is refused rather than warned
about. `msvc@system` is the single exception and is a different spelling: it
names a FAMILY whose installation mcpp locates, on the one platform where the
compiler cannot be redistributed.
THE LIBRARIES A PROGRAM LINKS ARE THE PROGRAM'S BUSINESS. A project may link a
host library or its own `.so`; mcpp names the supported route — declare the
provider so it resolves from mcpp-index, contribute the package if the index
does not carry it yet — and does not refuse while the result builds and runs.
The developer owns the artifact and guarantees it.
This replaces the previous commit's treatment of #527 Bug 1, which filled in
the resolved compiler path and warned. The crash it removed was real —
`posix_spawnp('') failed (error 2)` as soon as the project had a build.mcpp —
but a refusal that arrives as a crash three layers down is not a policy, it is
a bug wearing one. The refusal now fires during toolchain resolution, before
anything tries to compile the build program, and says what to write instead.
Three existing tests referenced the escape hatch and each needed a different
answer:
14_toolchain_fallback asserted only that `system` did NOT produce "no
toolchain configured". That predicate stays satisfied
by any other error, so the test went on passing while
its stated intent inverted — a negative-only
assertion cannot tell "it worked" from "it failed
differently". Both halves are checked now.
293_…_name_one_os used `system` to point a Linux compiler at a Windows
target. The refusal fires first, so the test began
taking its skip branch — and its own header says a
skip there has to be earned or the test cannot see a
revert. The refusal is now an accepted PASS branch
with its own reason, because the invariant holds by a
stronger mechanism: that door is closed entirely.
105_asm_sources_nasm genuinely unaffected; its broken-MCPP_HOME bootstrap
error still fires first. Verified, not assumed.
325 is rewritten accordingly, and asserts the refusal reaches the user before
the build program starts, that it fires for the environment side channel too,
that it names the msvc@system exception and the library axis, and — the
denominator — that a project with no `[toolchain]` at all still builds.
`mcpp.diag`'s host-route helper is reverted: with the toolchain axis refusing
rather than warning, and the library-provenance work not in this change, it
had no consumer. Shipping an unread field is the defect this branch is about.
Also fixes the version constant: `modules/versioning/src/version.cppm` is the
second source of truth `check_version_pins.sh` enforces, and CI caught it —
that mismatch is what failed e2e on all three platforms and the Windows
`SubsystemContracts.TheBinaryVersionMatchesTheRootManifest`.
0 commit comments