Skip to content

Commit 4f6edf3

Browse files
committed
docs(changelog): record the fix that shipped, not the one first written
The entry described `c_library_off_payload()` — a predicate that was replaced before this branch was pushed, because spelling the question as a list of the origins it is not answers three of `Origin`'s four values and goes quiet about `Xpkg`. What the code does is read `Layer::prebuilt()`, which already names the distinction this module's header draws: a directory that existed before resolution, against packages that had to be resolved first. Adds what was missing beside it — the rejected intermediate spelling, the ninja fixture's target side, and why the unit tests are written one per enum value rather than one per case the author thought of. ⚠️ A changelog that describes an earlier draft of a fix is worse than one that omits it: a reader who greps for `c_library_off_payload` finds nothing in the source and has no way to tell which of the two is stale.
1 parent f093828 commit 4f6edf3

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,33 @@
5656
区间由 CI 侧三分支并行二分给出:`8.21.3 绿 → 8.24.1 红`,唯一实质提交是
5757
#486。
5858
59+
⭐ **判据是层的来源,不是情形的列举。** `Origin` 有四个值
60+
(`Payload` / `Xpkg` / `Graph` / `None`),而链接线要问的是「C 库是不是来自
61+
解析之前就存在的目录」—— 这正是 `Layer::prebuilt()` 的定义,也是本模块开头
62+
那段注释划分世界的方式(prebuilt 在解析前可知,composed 在解析后才知)。
63+
因此**没有新增谓词**:两处改用 `cAbi.prebuilt()`,与既有的两处读法(C++ 层
64+
能否用载荷运行时、`check_layering`)成为同一个事实的第三次读取。
65+
66+
⚠️ 一版写成 `fromGraph() || absent()` 的中间修法被否掉了:它答对三个来源、
67+
对 `Xpkg`(来自预构建 sysroot 的 C 库)沉默,而那同样不是载荷的。
68+
69+
- **ninja 后端的测试夹具补上了目标侧。**
70+
71+
`minimal_plan()` 此前让 `TargetSide` 保持默认构造 —— 四层全 `Origin::None`,
72+
那不是「本机构建」,是「什么都还没解析」。它能一直蒙混过去,是因为旧判据
73+
对「全 None」与「载荷构建」给出同一个答案;换成链接线真正要问的问题,两者
74+
才分开,而夹具描述的于是变成「没有 C 库的目标」——它拿到 `-nostdlib -static`
75+
且不带任何运行期搜索路径,而这个文件里 44 条断言全是关于「有载荷 C 库」的。
76+
77+
⚠️ **没有任何生产路径会带着全 `None` 的 `TargetSide` 走到 flags**:`resolve`
78+
给普通本机构建的是 `cAbi = { Payload, … }`。夹具现在照实写。
79+
80+
### 测试
81+
82+
- 五条单元测试,**按 `Origin` 的四个值各一条**,外加一条把缺陷本身写成断言
83+
(内核接口的来源不参与这个决定)。按枚举写而不按想到的情形写:后者只覆盖
84+
作者想到的,前者在枚举新增取值时会留下可见的缺口。
85+
5986
## [2026.8.24.6] — 2026-08-25
6087
6188
### 新增

0 commit comments

Comments
 (0)