Skip to content

Commit f2df8db

Browse files
authored
2026.9.28.2: one resolver for the runtime beside a Windows program, header tracking on every host, one statement per fact, and conditional tables by specificity (#730)
The mcpp part of the 2026-09-28 ecosystem design (.agents/docs/2026-09-28-ecosystem-design-and-optimisation-plan.md, tasks M1-M9; section 8 records the implementation). - WS1: the files beside a PE program are decided by mcpp.build.runtime_placement: declared outranks toolchain, which outranks derived; the MSVC C++ runtime is one versioned set read from VERSIONINFO, the toolset's unless a complete, strictly newer set is offered; a dependency's copy is stated once as a packaging fault; the contract governs whether the set is carried, and a runtime file declared under host-coupled is refused. The plan, place-dlls (--crt, --toolset-crt) and mcpp pack read one answer; resolution.json records it. - WS1/D3: every action of an MSVC-ABI build has the toolset's runtime directory first on PATH (__action --path-prepend), so each action re-runs once after the upgrade. Measured with the system's runtime hidden: Qt's moc.exe and lrelease.exe start from a payload without a copy as actions of this version, on a Visual Studio row and on a masked row with a managed toolset. - WS2: a GNU depfile for every GNU-dialect compiler on every host. - WS3: mcpp.diag prints a fact once per process; notes are a severity; a word inherited from [workspace.build] is attributed there; an edge's success-time statements go through .mcpp-advice and are reported once on the full and the fast path (SPEC-007 R4.5). - D7 (#728): matching conditional tables apply by selector specificity. - WS8: self env --format json reports defaultToolchain; the docs tables are checked against it on each CI host. - WS7 (#729): check_workflow_assertions.py; pipefail on piped builds; the LLVM self-build on llvm@22.1.8 and the function-size gate after it; known-red legs name their issue. - WS10: release canaries gating the tag, tests/release/verify-published.sh, and the pull-request template's intersection table. - The xlings pin moves to 2026.9.28.2 (openxlings/xlings#628). Closes #728. Closes #729.
1 parent acb9f52 commit f2df8db

84 files changed

Lines changed: 5951 additions & 356 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/docs/2026-09-28-ecosystem-design-and-optimisation-plan.md‎

Lines changed: 690 additions & 0 deletions
Large diffs are not rendered by default.

‎.agents/docs/2026-09-28-ecosystem-review-of-two-days-of-mcpp-and-xlings.md‎

Lines changed: 335 additions & 0 deletions
Large diffs are not rendered by default.

‎.agents/docs/README.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ superseded_by: 2026-09-07-....md # when status is superseded
1818
---
1919
```
2020

21-
313 records.
21+
315 records.
2222

2323
## By subject
2424

@@ -30,6 +30,7 @@ Records that declare one. Everything else is listed by date below.
3030

3131
### design
3232

33+
- [An ecosystem design for mcpp and xlings: one authority per fact, and the work that follows from it](2026-09-28-ecosystem-design-and-optimisation-plan.md) — active
3334
- [The compile database, `emit build-database`, and #701/#702: triage against the specifications, and one design](2026-09-26-compile-database-and-issue-699-design.md) — landed
3435
- [Issues #693 to #696: triage against mcpp's contracts, and one repair plan](2026-09-25-issues-693-696-triage-and-repair-plan.md) — landed
3536
- [Workspace inheritance, flag scoping and the published form: a unified repair plan (#690)](2026-09-25-issue-690-workspace-build-inheritance-consistency.md) — landed
@@ -68,6 +69,7 @@ Records that declare one. Everything else is listed by date below.
6869

6970
### review
7071

72+
- [Two days of mcpp and xlings: a review of what merged, what is known, and what is open](2026-09-28-ecosystem-review-of-two-days-of-mcpp-and-xlings.md) — active
7173
- [#690: self-review before release, engine and ecosystem](2026-09-25-issue-690-self-review.md) — landed
7274
- [本轮生态级自审](2026-09-20-wave-self-review.md) — active
7375
- [#674 设计方案评审:`-include unistd.h` 在 Windows + `presents = "posix"` 上的可行性](2026-09-20-issue-674-design-review.md) — active
@@ -104,6 +106,8 @@ Records that declare one. Everything else is listed by date below.
104106

105107
### 2026-09
106108

109+
- [Two days of mcpp and xlings: a review of what merged, what is known, and what is open](2026-09-28-ecosystem-review-of-two-days-of-mcpp-and-xlings.md) — active
110+
- [An ecosystem design for mcpp and xlings: one authority per fact, and the work that follows from it](2026-09-28-ecosystem-design-and-optimisation-plan.md) — active
107111
- [Eight reports after 2026.9.27.1: implementation plan](2026-09-27-eight-reports-implementation-plan.md) — active
108112
- [Eight reports after 2026.9.27.1: what each one is, where it belongs, and one optimisation plan](2026-09-27-eight-reports-by-home-and-one-optimisation-plan.md) — active
109113
- [The compile database, `emit build-database`, and #701/#702: triage against the specifications, and one design](2026-09-26-compile-database-and-issue-699-design.md) — landed

‎.github/actions/bootstrap-mcpp/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ inputs:
2525
# `package.name`, so one of the two was simply unreachable — and which one
2626
# depended on the machine, which is why CI failed on `compat:lua` on
2727
# Windows and `mcpplibs.capi:lua` on Linux. Never pin below that.
28-
default: '2026.9.28.1'
28+
default: '2026.9.28.2'
2929
cache-target:
3030
description: also restore/save target/ (build artifacts + BMIs)
3131
required: false

‎.github/actions/setup-macos-llvm/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
# Floor imposed by the index, not a routine bump — see
1616
# .github/actions/bootstrap-mcpp/action.yml for why 0.4.69 is required
1717
# (two packages named `lua` in one repo need openxlings/xlings#381).
18-
default: '2026.9.28.1'
18+
default: '2026.9.28.2'
1919
image:
2020
description: >
2121
The runner label the job runs on (macos-15, xcode-27). It is part of the

‎.github/pull_request_template.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Summary
2+
3+
<!-- What changes, and why, in declarative sentences. Link the issues it closes. -->
4+
5+
## Criteria
6+
7+
<!-- For each change, the test that fails before it and passes after it, and
8+
where that test runs (host, CI job). A criterion that did not run is not
9+
a pass: say which ones are left to CI and why. -->
10+
11+
## Intersections
12+
13+
<!-- A release regression of 2026.9.27.1 had one shape three times: a new rule
14+
or feature crossed an existing invariant, and no test sat at the crossing
15+
(#725, #723, e2e 797). For each new gate, rule or feature in this change:
16+
17+
- which existing invariant does it cross?
18+
- which test sits at that crossing?
19+
20+
Write "none" only after looking. -->
21+
22+
| New rule or feature | Invariant it crosses | Test at the crossing |
23+
|---|---|---|
24+
| | | |
25+
26+
## Compatibility
27+
28+
<!-- What an existing project, home or client observes after the upgrade:
29+
changed output, a changed default, a full rebuild, a migration. -->
30+
31+
## Checks before merging
32+
33+
- [ ] `bash .github/tools/check_docs_style.sh`, `check_docs_structure.sh` and `check_version_pins.sh` pass.
34+
- [ ] `python3 .github/tools/check_workflow_assertions.py` passes (a step asserts what its name says).
35+
- [ ] No commit on the branch carries an attribution trailer:
36+
`git log origin/main..HEAD -i --grep='Co-Authored-By'` prints nothing.
37+
- [ ] The squash merge is given an explicit subject and body, so GitHub does not
38+
compose one from the branch's commits.

‎.github/release-canaries.toml‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Release canaries (the 2026-09-28 ecosystem design, WS10).
2+
#
3+
# Real projects built with the candidate mcpp before a release is tagged:
4+
# release.yml runs .github/workflows/release-canaries.yml first, and a canary
5+
# that fails blocks the tag. A regression that only a real project shows --
6+
# 2026.9.27.1's vcpkg compiler detection on GalTranslPP (#726) -- is then read
7+
# before the release instead of after it.
8+
#
9+
# The candidate is built from the commit being released. A project's own pin
10+
# of mcpp (`workspace.mcpp` in its `.xlings.json`) is removed in the project's
11+
# checkout, so nothing installs the released mcpp in its place; nothing is
12+
# committed to the project, and no override mechanism is added to xlings.
13+
#
14+
# Each entry: `repo` and `ref` to check out, the runner `os`, a `timeout` in
15+
# minutes, the `commands` run in the checkout with `$MCPP` naming the
16+
# candidate (each must exit 0; a command whose output must also say something
17+
# pairs it with `expect`), and `cache` paths kept between runs.
18+
19+
[[canary]]
20+
name = "xlings"
21+
repo = "openxlings/xlings"
22+
ref = "main"
23+
os = "ubuntu-24.04"
24+
timeout = 60
25+
commands = [
26+
"$MCPP build",
27+
"$MCPP test",
28+
]
29+
30+
[[canary]]
31+
name = "mcppls"
32+
repo = "Sunrisepeak/mcpp-language-server"
33+
ref = "main"
34+
os = "ubuntu-24.04"
35+
timeout = 60
36+
commands = [
37+
"$MCPP build",
38+
"$MCPP build -p devtools",
39+
"$MCPP test",
40+
]
41+
42+
[[canary]]
43+
name = "GalTranslPP"
44+
repo = "Sunrisepeak/GalTranslPP"
45+
ref = "build/mcpp-zero-setup"
46+
os = "windows-2025"
47+
timeout = 300
48+
submodules = true
49+
commands = [
50+
"$MCPP build --workspace --profile fast-release",
51+
"$MCPP run -p GPPCLI --profile fast-release < /dev/null",
52+
"cd GPPCLI && $MCPP pack --format release --profile fast-release",
53+
"cd GPPGUI && $MCPP pack --format release --profile fast-release",
54+
]
55+
expect = { "$MCPP run -p GPPCLI --profile fast-release < /dev/null" = "GalTransl++ CLI v" }
56+
cache = [
57+
"~/AppData/Local/vcpkg/archives",
58+
"~/AppData/Local/vcpkg/downloads",
59+
"~/AppData/Local/vcpkg/registries",
60+
]
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
#!/usr/bin/env python3
2+
"""The documentation states the default toolchain the resolver picks on this
3+
host (the 2026-09-28 ecosystem design, WS8).
4+
5+
WHY THIS EXISTS
6+
7+
docs/01 and docs/20 state, in two languages, which toolchain a first run
8+
installs on each host. The review of 2026-09-28 found them stating llvm@20.1.7
9+
while the readings it had in hand said llvm@22.1.8, and nothing compared the
10+
two. The answer now has one authority, `pins::host_default_toolchain`, reported
11+
by `mcpp self env --format json` as `data.defaultToolchain`; this script reads
12+
that report on the host it runs on and checks the four statements of that
13+
host's row against it. Each CI host row runs it, so every row of the tables is
14+
checked on the machine it describes.
15+
16+
Usage:
17+
python3 .github/tools/check_default_toolchain_docs.py --mcpp <binary>
18+
python3 .github/tools/check_default_toolchain_docs.py --spec gcc@16.1.0 --os Linux --arch x86_64 [--root DIR]
19+
The second form is for the fixture tests (tests/scripts/).
20+
"""
21+
from __future__ import annotations
22+
23+
import argparse
24+
import json
25+
import platform
26+
import re
27+
import subprocess
28+
import sys
29+
from pathlib import Path
30+
31+
32+
def normalise(text: str) -> str:
33+
return re.sub(r"\s+", " ", text)
34+
35+
36+
def expected_phrases(spec: str, os_name: str, arch: str) -> dict[str, list[str]]:
37+
"""The statements of this host's row, per file, with `spec` in place."""
38+
s = f"`{spec}`"
39+
if os_name == "Linux":
40+
if arch in ("x86_64", "amd64"):
41+
return {
42+
"docs/01-getting-started.md": [f"| Linux x86_64 | {s} |"],
43+
"docs/zh/01-getting-started.md": [f"| Linux x86_64 | {s} |"],
44+
"docs/20-toolchains.md": [f"- Linux x86_64 uses {s}"],
45+
"docs/zh/20-toolchains.md": [f"- Linux x86_64 使用面向原生 glibc ABI 的 {s}"],
46+
}
47+
return {
48+
"docs/01-getting-started.md": [f"| other Linux architectures | {s} |"],
49+
"docs/zh/01-getting-started.md": [f"| 其它 Linux 架构 | {s} |"],
50+
"docs/20-toolchains.md": [f"- Other Linux architectures use {s}"],
51+
"docs/zh/20-toolchains.md": [f"- 其他 Linux 架构使用 {s}"],
52+
}
53+
if os_name == "Darwin":
54+
return {
55+
"docs/01-getting-started.md": [f"| macOS | {s} |"],
56+
"docs/zh/01-getting-started.md": [f"| macOS | {s} |"],
57+
"docs/20-toolchains.md": [f"- macOS uses {s}."],
58+
"docs/zh/20-toolchains.md": [f"- macOS 使用 {s}。"],
59+
}
60+
if os_name.startswith(("Windows", "MINGW", "MSYS", "CYGWIN")):
61+
if spec.startswith("gcc@"):
62+
return {
63+
"docs/01-getting-started.md": [f"| Windows without it | {s} for `x86_64-windows-gnu` |"],
64+
"docs/zh/01-getting-started.md": [f"| 没有 MSVC 的 Windows | 面向 `x86_64-windows-gnu` 的 {s} |"],
65+
"docs/20-toolchains.md": [f"Without usable MSVC, it uses {s} with target `x86_64-windows-gnu`"],
66+
"docs/zh/20-toolchains.md": [f"没有可用 MSVC 时使用 {s},target 为 `x86_64-windows-gnu`"],
67+
}
68+
return {
69+
"docs/01-getting-started.md": [f"| Windows with usable MSVC | {s} |"],
70+
"docs/zh/01-getting-started.md": [f"| 有可用 MSVC 的 Windows | {s} |"],
71+
"docs/20-toolchains.md": [f"- Windows with a usable MSVC installation uses {s} for the MSVC ABI."],
72+
"docs/zh/20-toolchains.md": [f"- Windows 上存在可用 MSVC 时使用面向 MSVC ABI 的 {s}"],
73+
}
74+
raise SystemExit(f"FAIL: no documented row for host {os_name} {arch}")
75+
76+
77+
def reported_default(mcpp: str) -> str:
78+
out = subprocess.run([mcpp, "self", "env", "--format", "json"],
79+
capture_output=True, text=True, check=False)
80+
if out.returncode != 0:
81+
raise SystemExit(f"FAIL: `{mcpp} self env --format json` exited {out.returncode}: {out.stderr.strip()}")
82+
data = json.loads(out.stdout).get("data", {})
83+
spec = data.get("defaultToolchain", "")
84+
if not spec:
85+
raise SystemExit("FAIL: `self env --format json` reports no defaultToolchain")
86+
return spec
87+
88+
89+
def main() -> int:
90+
ap = argparse.ArgumentParser()
91+
ap.add_argument("--mcpp")
92+
ap.add_argument("--spec")
93+
ap.add_argument("--os", default=platform.system())
94+
ap.add_argument("--arch", default=platform.machine())
95+
ap.add_argument("--root", default=".")
96+
args = ap.parse_args()
97+
if not args.spec and not args.mcpp:
98+
ap.error("either --mcpp or --spec is required")
99+
spec = args.spec or reported_default(args.mcpp)
100+
root = Path(args.root)
101+
problems = []
102+
for rel, phrases in expected_phrases(spec, args.os, args.arch).items():
103+
text = normalise((root / rel).read_text(encoding="utf-8"))
104+
for phrase in phrases:
105+
if normalise(phrase) not in text:
106+
problems.append(f"{rel}: does not state `{phrase}`")
107+
for p in problems:
108+
print(f"FAIL: {p}")
109+
print(f"defaultToolchain on {args.os} {args.arch}: {spec}; {len(problems)} problem(s)")
110+
return 1 if problems else 0
111+
112+
113+
if __name__ == "__main__":
114+
sys.exit(main())

‎.github/tools/check_function_sizes.sh‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@
3333
# the caller runs that build first. check_file_lengths.sh needs no such
3434
# division because it reads the tree.
3535
#
36-
# NOT IN CI YET. The only CI job that builds mcpp with clang (ci-linux.yml,
37-
# "toolchain: musl + llvm", llvm@20.1.7) does not produce a complete build:
38-
# libc++ 20's `std` module does not make directory_iterator's comparison
39-
# visible, and that step reads the resolution line rather than the build's
40-
# exit status. Over the partial database clang-tidy crashes. The gate is wired
41-
# in once a CI job builds mcpp with clang (mcpp-community/mcpp#729); until
42-
# then it is run by hand after `mcpp build --toolchain llvm@22.1.8`.
36+
# IN CI SINCE 2026.9.28.2 (#729). ci-linux.yml's "toolchain: musl + llvm" job
37+
# builds mcpp with llvm@22.1.8 -- failing on the build's own status, which it
38+
# did not do while it built with llvm@20.1.7 and read only the resolution line
39+
# -- and runs this script after it, over the compile database that build
40+
# writes. By hand: `mcpp build --toolchain llvm@22.1.8`, then this script.
4341
#
4442
# clang-tidy itself is not part of the plain xim:llvm payload mcpp resolves
4543
# for `--toolchain llvm@...` (measured: xim-x-llvm/22.1.8/bin has clang,

0 commit comments

Comments
 (0)