Skip to content

Commit f582a6c

Browse files
speak-agentclaude
andcommitted
CHANGELOG: the prepare.cppm decomposition as it landed
The entry states the result rather than the plan: a primary interface of exported types, inline functions and declarations; implementation units and the `:state` partition, each importing what it uses and capped at 2,500 lines by CI; byte-identical planning output over the seven golden fixtures; an edit in P13 rebuilding in 12 s instead of 71 s; and #721 for the GCC 16.1 constraint. test_prepare_helpers joins the list of tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a9ce4a3 commit f582a6c

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,17 @@
6565
### 其他
6666

6767
- 测试:e2e 804 覆盖不属于任何工作空间的路径宿主工具包的工具链选择(#710);e2e 802 固定 gcc
68-
工具链,使其断言不依赖机器的默认工具链。
68+
工具链,使其断言不依赖机器的默认工具链;单元测试 `test_prepare_helpers` 覆盖各阶段共用的纯函数
69+
(`--features` 请求语法、宏名、git 远端是否本地等)。
6970
- ELF 检查以一次读取载入文件。此前逐字节读入,`mcpp test` 的链接后检查在测试程序较多时耗时
7071
数十分钟。
71-
- **`src/build/prepare.cppm` 的内部分解。** 原文件 16,105 行,其中一个函数 `prepare_build`
72-
占 85%。按 §4.1 划出的十三个阶段拆分为 `PrepareState`(跨阶段状态,取代原来约 180 个共用
73-
一个栈帧的局部变量)加十三个阶段函数,后者移入 `src/build/prepare/` 下十二个实现单元与一个
74-
实现分区 `:state`;主接口 `prepare.cppm` 只保留导出声明。行为逐条移动,未重排、未改写。公开
75-
接口、导出符号与默认参数不变,现有导入方无需改动。分解本身不改变任何行为,详见
76-
`src/build/prepare.cppm` 开头的布局说明与 GCC 16.1 约束记录。
72+
- **`src/build/prepare.cppm` 的内部分解。** 原文件 16,105 行,其中函数 `prepare_build` 占 85%。
73+
它拆为按阶段划分的函数,跨阶段的状态集中在 `PrepareState`(取代原来约 180 个共用一个栈帧的
74+
局部变量)。主接口 `prepare.cppm` 只保留导出的类型、内联函数与声明;实现位于 `src/build/prepare/` 下的
75+
实现单元与实现分区 `:state`,各单元只导入自己用到的模块,每个文件不超过 2,500 行,由 CI 检查。
76+
代码逐段移动,不重排语句;公开接口、导出符号与默认参数不变,七个场景的规划输出与分解前逐字节
77+
一致。修改一个阶段只重新编译该实现单元:本机修改 P13 中的一处字符串,增量构建 12 s,分解前
78+
71 s。模块组织受 GCC 16.1 的内部编译器错误约束,见 #721。
7779
- 规范:SPEC-001 v1.5、SPEC-004 v1.8、SPEC-005 v1.4、SPEC-007 v0.3。
7880

7981
## [2026.9.26.2] - 2026-09-26

0 commit comments

Comments
 (0)