Skip to content

Commit 55d2d51

Browse files
committed
build: the fast path sees a path dependency's whole tree and resumes after a confirmed edit; its reasons are statements (#734 E5)
The dependency sweep read only src/, so an edit to a host module elsewhere in a path dependency (mcpp-plugins keeps its members in deps/, rules/, dist/ and tools/) was replayed as no work: such a unit is compiled into the consumer's build program, which no edge of build.ninja names. The sweep now walks the dependency's tree, skipping hidden directories, target and nested packages. A full build that confirms the graph left an unchanged build.ninja unwritten, and the fast path compares every source with its time, so after any edit every later build was planned in full until the graph's text changed. The backend now moves the file's time when it confirms the graph. 2026.9.28.2 shows both defects on Linux; e2e 831 and 832 fail with it and pass with this change. Under -v each refusal is now a statement of its condition rather than the condition's code.
1 parent 19bee65 commit 55d2d51

5 files changed

Lines changed: 220 additions & 47 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ SPEC-007 §9 与新的 SPEC-008。配套的 mcpp-plugins 0.17.0 以本版本为
2525
一行列出每个未发布的单元(此前没有接口根时显示 "(nothing)",而两个导出模块既未发布也未列出);
2626
`mcpp build` 在包导入依赖的非公开模块时警告(W3);缺少接口根的警告写明对 `mcpp pack` 的后果
2727
(W1)。全部为警告。
28+
- **快路径在一次确认之后恢复。** 编辑源码后的那次构建经完整路径确认了图,却不重写内容未变的
29+
build.ninja,而快路径以 build.ninja 的时间比较每个源码;此前编辑之后的每次构建都被拒绝,直到图的
30+
文本改变。现在确认时移动 build.ninja 的时间(e2e 832,2026.9.28.2 在 Linux 上同样复现)。
31+
- **快路径看见 path 依赖的整棵源码树。** 此前只扫描依赖的 `src/`;依赖在别处的 host module
32+
(例如 mcpp-plugins 的 `deps/vcpkg.cppm`)编入消费方的构建程序,不在任何 ninja 边上,被编辑后
33+
构建报告"无事可做"。现在扫描依赖的整棵树,跳过隐藏目录、`target` 与嵌套的包(e2e 831)。
34+
- **`mcpp.core` 的输出不再把 `FILE` 带入模块接口。** `mcpp::report` 只经 `printf` 输出;此前 GCC
35+
拒绝在 `import mcpp;` 之后 `#include <cstdio>` 的构建程序(e2e 651)。
2836

2937
### 特性
3038

@@ -43,7 +51,7 @@ SPEC-007 §9 与新的 SPEC-008。配套的 mcpp-plugins 0.17.0 以本版本为
4351
- **包的版本下限(E9)。** `[package] mcpp = ">=<release>"` 与 `[workspace.package] mcpp`;
4452
低于下限的引擎在其他工作之前停止,写出升级命令;只接受 `>=`。
4553
- **`[lib]` 报告未知键(E12)。** 此前拼错的 `path` 被静默接受。
46-
- **快路径说明拒绝原因(E5 的测量部分)。** `-v` 下每个拒绝点写出其条件。
54+
- **快路径说明拒绝原因(E5 的测量部分)。** `-v` 下每个拒绝点以一句话写出其条件。
4755

4856
### 兼容性
4957

0 commit comments

Comments
 (0)