Skip to content

Commit 8cc7676

Browse files
committed
Version 2026.9.15.2; CHANGELOG; the plan's ledger and refinements
1 parent 9100942 commit 8cc7676

4 files changed

Lines changed: 83 additions & 12 deletions

File tree

.agents/docs/2026-09-15-641-642-implementation-plan.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ the parallel work trees of §8.
2828

2929
| id | task (triage §) | owner | depends on | status |
3030
|---|---|---|---|---|
31-
| M1 | a required compiler family's version is taken from pins that name the same payload; the refusal no longer states a false reason (§3.1) | lead | - | todo |
32-
| M2 | `mcpp pack --features` reaches every build pass `pack` performs (§3.6) | lead | - | todo |
33-
| M3 | a dependency's C++ shared library in a graph whose C++ runtime is a package is refused before compiling, unless `cxx_runtime` states `self-contained` for shared libraries; under that statement the library links the provider's objects (§3.3) | lead | - | todo |
34-
| M4 | `linkage = "static" \| "shared"` in `[targets.<n>]` and `[target.<sel>.targets.<n>]` states the package's default form; precedence and the information line (§3.4) | W1 | - | todo |
35-
| M5 | dependency link forms are computed once before the root's build program and applied where they are today; `MCPP_DEP_<NAME>_LINKAGE` and `mcpp::dep_linkage` for the root's program (§3.5) | W1 | M4 | todo |
36-
| M6 | a C++-layer provider that states `[package] standard` compiles its implementation units at that level; module units stay at the graph's (§3.2) | W2 | - | todo |
37-
| M7 | the object address of a source outside its declaring package is relative to its owning package, or a hashed directory when no package owns it (§3.7 item 3) | W3 | - | todo |
38-
| M8 | the host-tool sub-build runs in a short key-named scratch directory (§3.7 item 2) | W3 | - | todo |
39-
| M9 | files the engine opens from ninja-invoked subcommands go through one extended-length path helper on Windows (§3.7 item 1) | W3 | - | todo |
40-
| M10 | CI: the llvm-dependent e2e scripts of M3 and M6, and the existing 663, run on a job that has llvm, with their PASS lines asserted (§1.8) | lead | M3, M6 | todo |
31+
| M1 | a required compiler family's version is taken from pins that name the same payload; the refusal no longer states a false reason (§3.1) | lead | - | branch: unit `RequiredFamilyPins.*`; M1 probe reads `llvm@30.0.16248370` on 2026.9.15.1 |
32+
| M2 | `mcpp pack --features` reaches every build pass `pack` performs (§3.6) | lead | - | branch: e2e 689 (fails on 2026.9.15.1: `pack --features installer failed`) |
33+
| M3 | a dependency's C++ shared library in a graph whose C++ runtime is a package is refused before compiling, unless `cxx_runtime` states `self-contained` for shared libraries; under that statement the library links the provider's objects (§3.3) | lead | - | branch: e2e 690, four legs (fails on 2026.9.15.1: the refusal is absent) |
34+
| M4 | `linkage = "static" \| "shared"` in `[targets.<n>]` and `[target.<sel>.targets.<n>]` states the package's default form; precedence and the information line (§3.4) | W1 | - | branch: unit `LinkageForm.*`, manifest cases; e2e 692 (fails on 2026.9.15.1: no libfw.so for a silent consumer) |
35+
| M5 | dependency link forms are computed once before the root's build program and applied where they are today; `MCPP_DEP_<NAME>_LINKAGE` and `mcpp::dep_linkage` for the root's program (§3.5) | W1 | M4 | branch: e2e 693 (fails on 2026.9.15.1: `'dep_linkage' is not a member of 'mcpp'`) |
36+
| M6 | a C++-layer provider that states `[package] standard` compiles its implementation units at that level; module units stay at the graph's (§3.2) | W2 | - | branch: unit `CxxLayerStandard.*` (9), `CacheKey` case; e2e 696 (fails on 2026.9.15.1: `new.cpp` at `-std=c++20`) |
37+
| M7 | the object address of a source outside its declaring package is relative to its owning package, or a hashed directory when no package owns it (§3.7 item 3) | W3 | - | branch: unit `ObjectAddress.*`; e2e 698 leg A (fails on 2026.9.15.1: `obj/installer/__up/__up/dep/...`) |
38+
| M8 | the host-tool sub-build runs in a short key-named scratch directory (§3.7 item 2) | W3 | - | branch: unit `ToolStoreScratch.*`; e2e 698 leg B |
39+
| M9 | files the engine opens from ninja-invoked subcommands go through one extended-length path helper on Windows (§3.7 item 1) | W3 | - | branch: unit `PlatformFs.*`; e2e 698 leg C (Windows readings from CI) |
40+
| M10 | CI: the llvm-dependent e2e scripts of M3 and M6, and the existing 663, run on a job that has llvm, with their PASS lines asserted (§1.8) | lead | M3, M6 | branch: `ci-linux-e2e.yml` hermetic job step |
4141
| M11 | user documentation with its Chinese mirror; SPEC changes; CHANGELOG; version 2026.9.15.2 | lead, W1-W3 | M1-M9 | todo |
4242
| M12 | the triage and plan records closed with their readings | lead | all | todo |
4343

@@ -158,6 +158,36 @@ which has never run in CI, directly on the `hermetic` job (which already
158158
installs `llvm@22.1.8`) and asserts each script's final PASS line, and the
159159
line of the run step inside it.
160160

161+
### 1.9 Refinements found while implementing
162+
163+
- **M5's computation follows the layer-conditional pass (L1b), not only the
164+
dependency programs.** L1b changes dependency manifests, so a computation
165+
placed before it would read facts that are not final. The p1689 scanner had a
166+
source enumeration of its own that ignored `!` exclusions; it now reads the
167+
function the resolution reads. Form B descriptors read `linkage` as
168+
`mcpp.toml` does, and SPEC-001 records the precedence (v1.4, criterion 9).
169+
- **M6's level enters the dependency cache key and the fingerprint** when a
170+
provider states one, because the graph's level alone no longer says which
171+
level the provider's sources were compiled at. The opt-in p1689 scan runs
172+
before planning and still preprocesses these units at the graph's level,
173+
which affects import detection only.
174+
- **M7 and M8 shorten the issue's case to about 170 characters,** so crossing
175+
260 now needs nesting deep inside the dependency; e2e 698 leg C does that and
176+
is the Windows reading of whether ninja and the compilers cope. M9 had to
177+
guard two things beyond opens: a path string ninja reads back (the copied
178+
depfile's target keeps ninja's spelling) and an ANSI Win32 call
179+
(`CreateFileW` for the detached compile's log).
180+
- **M3's static remedy depends on who made the library shared.** A package that
181+
constrains its form (`declaredShared`) cannot be linked static from its edge,
182+
so that remedy is offered only when a request or the package's default
183+
decided, and the refusal names the package's statement otherwise. `mcpp run
184+
--format` built its pack without the run's features; it now passes them.
185+
- **F3, recorded and not addressed.** The std module object is linked into every
186+
C++ image, so a program over a C++ shared library that imports `std` reports
187+
its module initialiser as provided twice (`symbol_provision`). This predates
188+
the work: under gcc on 2026.9.15.1 the same shape reports 882 symbols; under
189+
the private copy of M3 it reports two, `_ZGIW3std` and `_ZGIW3stdW6compat`.
190+
161191
## 2. Engine tasks
162192

163193
### 2.1 M1

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,47 @@
55

66
## [Unreleased]
77

8+
### 链接形态、标准档位与路径长度:#641 与 #642(2026.9.15.2)
9+
10+
一个 UI 框架迁到 macOS 12 下限与 Android 独立共享库时报告的七项,全部在引擎内处理。
11+
设计与实测记录:`.agents/docs/2026-09-15-641-642-*.md`。
12+
13+
- **必需编译器族的版本取自同一载荷的 pin(#641 项 1)。** 全新 home 上
14+
`requires = ["mcpp:compiler=llvm"]` 此前按族比较行 pin,取到 NDK 的
15+
`llvm@30.0.16248370`;`compiler=emsdk` / `compiler=android-ndk` 则一个都匹配不到,
16+
并谎称没有行固定版本。现按 `to_xim_package` 的包名比较(`pinned_versions_for`)。
17+
(单测 `RequiredFamilyPins.*`)
18+
- **C++ 层提供者按自己声明的标准编译实现单元(#641 项 2)。** 提供
19+
`hosted-standard-library` / `mcpp:c++-abi=` 的包若写了 `[package] standard`,其既不
20+
提供也不导入模块的 C++ 单元按该档位编译,模块单元(含 std 模块)仍按图的档位;
21+
于是 c++20 的程序可以使用 `llvm.libcxx`。该档位进入依赖缓存键与指纹;不写的提供者
22+
逐字节不变。(单测 `CxxLayerStandard.*`,e2e 696)
23+
- **工具构建的路径有界(#641 项 3)。** 位于声明包之外的源文件,对象地址改为
24+
`obj/<声明包>/__pkg/<所属包>/<包内路径>`,无所属包时为 `obj/<声明包>/__ext/<目录哈希>/`;
25+
host 工具子构建的暂存目录改为 `<cache>/tool/.build/<16 位哈希>`;ninja 调用的引擎子命令
26+
在 Windows 上以扩展长度路径打开文件。(单测 `ObjectAddress.*`、`PlatformFs.*`、
27+
`ToolStoreScratch.*`,e2e 698)
28+
- **`mcpp pack --features`(#641 项 4)。** 作用于打包的每一次构建(每条 `--target` 腿、
29+
分派格式的两次构建);`mcpp run --format` 把自己的 feature 交给它执行的打包。(e2e 689)
30+
- **图中的 C++ 运行时之上的依赖共享库(#641 项 5)。** 运行时包的对象只链进程序,依赖
31+
的 C++ 共享库此前没有任何 C++ 运行时(Linux 上 lld 拒绝链接程序,macOS 上 dylib
32+
链接失败)。现在编译前拒绝,reason 为 `shared-library-cxx-runtime`,并给出出路;
33+
写明 `cxx_runtime = { shared = "self-contained" }` 时,共享库链接运行时包对象的私有
34+
副本。实测:每个镜像一份副本时,共享库抛出的 `std::runtime_error` 在程序中不能按该类
35+
捕获,拒绝消息写明这一后果。(e2e 690,在 hermetic llvm job 上运行)
36+
- **包声明默认链接形态(#642 E1)。** `[targets.<n>]` 与
37+
`[target.<sel>.targets.<n>]` 中的 `linkage = "static" | "shared"` 是包的默认值,
38+
`kind = "shared"` 仍是约束;根的边 `linkage`、显式的 `[build] dependency_linkage`
39+
依次优先于它,覆盖默认值时打印一行信息而非降级,`--strict` 接受。解析记录的 reason
40+
为 `package-default` 或 `requested`。(单测 `LinkageForm.*`,e2e 692)
41+
- **根构建程序读取依赖的链接形态(#642 E2)。** 依赖的链接形态在根构建程序之前计算一次,
42+
应用位置不变;根构建程序得到 `MCPP_DEP_<NAME>_LINKAGE` 与 `mcpp::dep_linkage(name)`。
43+
依赖的构建程序不提供该值:只有根决定链接形态,且它运行时排在其后的包的输入尚未齐备。
44+
`hasSources` 取自扫描器导出的 `package_source_files`,p1689 扫描器由此也遵循 `!` 排除。
45+
(e2e 693)
46+
- CI:`ci-linux-e2e` 的 hermetic job 直接运行 663、690、696 并断言其结束行;这三份脚本
47+
需要 llvm,分片上一向被跳过。
48+
849
### `mcpp emit build-database`:不写工程目录的构建数据库(#636,2026.9.15.1)
950

1051
新命令按 `mcpp build --configure-only` 的方式、用相同的选择器规划,把计划打印为

mcpp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mcpp"
3-
version = "2026.9.15.1"
3+
version = "2026.9.15.2"
44
description = "Modern C++ build & package management tool"
55
license = "Apache-2.0"
66
authors = ["mcpp-community"]

modules/versioning/src/version.cppm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ import std;
3131

3232
export namespace mcpp {
3333

34-
inline constexpr std::string_view MCPP_VERSION = "2026.9.15.1";
34+
inline constexpr std::string_view MCPP_VERSION = "2026.9.15.2";
3535

3636
} // namespace mcpp

0 commit comments

Comments
 (0)