Commit f14391a
authored
sync: 工具链 pin 跟进 — mcpp → 2026.8.1.1,d2x → 2026.08.02.1 (#87)
* sync: 工具链 pin 跟进 —— mcpp 0.0.104 → 2026.8.1.1,d2x → 2026.08.02.1
mcpp 侧不是升级偏好,是必须:mcpplibs 依赖索引已把 index floor 抬到 0.0.109,
钉在 0.0.104 的工程一律 E0006「index requires mcpp >= 0.0.109」而拒绝解析依赖。
d2x 仓库的 CI 因此一度全平台红,并为本课程加了一步「安装前把 pin 对齐」的
workaround —— 本次同步之后那步就可以撤掉了。
d2x 侧跟到刚发布的 2026.08.02.1:Win10 / Win11 CI(完整测试段 + 以本课程做
checker 真实冒烟)、Windows 上练习页路径显示修复、Windows 活性超时补齐。
CI 头部注释一并更新:原文只写了「依赖 mcpp >= 0.0.104」,而真实下限已被上游
抬到 0.0.109,不写清楚下一个人会以为 0.0.104 还能用。
* fix(provider): Windows 上 capture_stdout 的 2>/dev/null 让 mcpp test 根本没跑
Windows 上每道练习都判不出结果,现象是 Provider 报「mcpp test 没有返回
'<test>' 的记录」,看起来像 mcpp 不支持 --message-format json —— 实际是本仓库
Provider 自己的问题。
capture_stdout 无条件给命令尾巴上接 ` 2>/dev/null`。Windows 上 _popen 走的是
cmd.exe,那里没有 /dev/null:cmd 把它当成「重定向到 \dev\null 这个路径」,而
\dev 不存在,于是直接报
The system cannot find the path specified.
并且整条命令根本不执行。mcpp test 一条 JSON 都没吐,解析侧 saw_any 为假,判定
链退化成「没有该测试的记录」,那句「mcpp 可能不支持 --message-format json」的
提示把锅指错了方向。
证据(d2x 的 Win10 / Win11 checker 冒烟实测):
外层 `mcpp run -q -p d2x/buildtools -- check hello-mcpp` 本身跑得通 —— 说明
mcpp 在 PATH 上(不在的话 cmd 会报 'mcpp' is not recognized,是另一句话);
只有内层带 2>/dev/null 的 mcpp test 挂掉。两者唯一的差别就是这个重定向。
空设备在 cmd 下叫 NUL,按平台分开写即可。POSIX 分支拼出的字符串与改前逐字节
相同,linux 行为不变;本地实测 check hello-mcpp 仍是 stage → output(真实编译
错误)→ verdict fail。1 parent d0a7fbe commit f14391a
3 files changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
| |||
0 commit comments