2026.9.25.1: workspace members compile the same way in every position, and a consumer's headers stay in the consumer (#690) - #691
Merged
Conversation
…nes, one key table (#690) A member reached as a dependency now inherits [workspace.package], x.workspace = true entries and [workspace.build] at its load site, before the conditional merge and the defines fold, as the root does. The snapshot in makePackageRoot no longer inherits and refuses unfolded defines with an internal error. A member of a git-hosted workspace inherits from its own repository. [build] defines is a set keyed by macro name, and !NAME removes an inherited name. The inheritable [build] subset is one exported table, which accepts ios_deployment_target. The e2e harness links payloads per version, so a version installed by a test no longer lands in the developer's registry.
… W6) The root's [build] include_dirs and include_dirs_after were written into the file-level $cxxflags/$cflags/$asmflags/$nasmflags of build.ninja, which every unit in the graph reads. A root header named like a system header shadowed it inside a dependency, private_include_dirs included, and because no cache-key axis contained the broadcast, a dependency object in the global cache could be compiled against another project's root headers (measured: cJSON_Compare answered 1 in an unrelated project). - flags.cppm: no include directory is broadcast; every unit keeps its own package's directories through $local_includes (C, C++, GAS and NASM). - cache_key.cppm: kCacheEpoch 3 -> 4, orphaning entries written while the broadcast existed. - ninja_backend.cppm / execute.cppm: consumer_include_scope_advice names the consumer directory that holds a header a dependency now fails to find, on the full path and, through a sidecar beside build.ninja, on the fast path. - tests: unit tests for the file-level channel, the unit channel's absolutisation, the advice and the sidecar; e2e 765.
… scope; SPEC-004 1.6 (#690)
…eproducible archive (#690 W4, W5)
…2026.9.25.1 (#690 W4) prepare_build loads through load_effective_manifest and no longer inherits a preloaded host-tool manifest a second time. sbom, index list/update, the index refresh of mcpp update, the fast-path identity and test discovery read the effective manifest.
… reads the one key table (#690) inherit_as_workspace_member is the one function for a sibling path dependency, a git-hosted member and a member inside an index package's archive (Form A pointer), searched no higher than the install root. normalize.cppm writes [workspace.build] back through kWorkspaceBuildKeys instead of a second copy of the key set. e2e 774.
…LOG 2026.9.25.1, SPEC-004 criteria 13-14
…lob ignores .gitattributes
…ns once (#690 F12); self-review record
…d from 765 (c), cmd.exe quoting in 775
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[workspace.build] definesdid not reach a workspace member compiled as a sibling'spathdependency (#690). The cause was that inheritance ran at the snapshot into the build graph, after thedefinesfold. The audit behind this fix found ten further findings in the same family: inheritance placement, readers outsideprepare_build, and flag scoping. This pull request fixes all of them. Design record, plan and sandbox verification script are in.agents/docs/2026-09-25-issue-690-*.[workspace.package],x.workspace = trueentries and[workspace.build]at its load site, in the order the root follows. The same applies to a member of a git-hosted workspace and to a member inside an index archive, each inheriting from its own repository or archive. The snapshot only captures the result. It refuses unfoldeddefineswith an internal error. The root no longer receives the workspace flags twice.defines(W7).definesis a set keyed by macro name. A later entry replaces the earlier one in place, and!NAMEremoves the name.kWorkspaceBuildKeysis the only list of inheritable keys. The parser, the error text and the publisher read it.ios_deployment_targetis now accepted.publish,pack,emit xpkg,toolchain list,sbom, the index commands, the fast path and test discovery read the inherited manifest.mcpp.tomlis normalised: inherited values are inlined, and sibling edges become version edges. The original is kept asmcpp.toml.orig. The archive is reproducible, and the descriptor'sdepsinclude sibling edges.private_include_dirs, no longer reach its dependencies. A missing-header note names the consumer directory that holds the header.kCacheEpochgoes from 3 to 4, because measured cache entries were compiled against another project's headers._inherit_toolchain.shnow links payloads per version, so a version a test installs no longer writes through into~/.mcpp(e2e: _inherit_toolchain.sh symlinks real toolchain payloads into a temp MCPP_HOME, so tests corrupt the developer's installed gcc #293, second shape).Closes #690
Test plan
mcpp test: 127 passed, 0 failed. New suites:test_workspace_inheritance,test_toml_serialize,ConsumerIncludeScopeAdvice.MCPP_BOOTset to 2026.9.24.1: the released client builds the normalised archive.~/.mcppis unchanged afterwards.mcpp test -pwith the candidate binary..agentsindex and version-pin checks pass.