Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .agents/docs/2026-12-06-cli-surface-people-and-agents-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ $ mcpp clean --stale
```

- **一个标签。** 成功之后指向下一步的那一行,在 `new`、`add`、`search` 中都是 `tip:`,经同一个收尾机制(`diag::closing`)输出:
它是命令的最后一行,`--quiet` 与 JSON 输出下没有。不另设 `Next:` 与 `Tips:`。
它是命令的最后一行,`--quiet` 与 JSON 输出下没有。不另设 `Next:` 与 `Tips:`:小写与 `error:`、`warning:`、`note:`、`help:`
同属一类标注,首字母大写的是报告的段名。结果是一块(报告、列表、卡片)时,第一个 `tip:` 与它隔一个空行,两个流到达同一个
终端时才如此;结果是一行时紧随其后。一条 `tip:` 只给下一步的一句,细节在命令的帮助与说明里。
- 字节数在删除的同一次遍历中累计,不为它多走一遍。
- `--bmi-cache` 的结果是第二行 `Removed build cache …`;关于旧缓存的括注移到说明。
- `clean` 的错误经 `mcpp::ui::error` 输出并带 `help:`(不在工程里时:`help: run it in a directory with mcpp.toml`)。
Expand Down Expand Up @@ -327,8 +329,7 @@ Tools and runtimes (2):
xim:fx 39.2.0 Terminal JSON viewer & processor
xim:gron 0.7.1 Make JSON greppable

tip: mcpp info <name> shows one package; mcpp add <name> adds a library to [dependencies],
a tool or a runtime to the project environment ([xlings.workspace])
tip: mcpp info <name> shows a package; mcpp add <name> adds it
```

- **两段,段名带数量。** mcpp 包在前。第二段名为 Tools and runtimes:提供者的包既有在构建机上运行的工具(宿主轴),
Expand Down Expand Up @@ -392,8 +393,7 @@ A simple command-line parsing library/framework for modern C++
3. **有读不到的行时,最后一行是 `tip:`,写明 `--fetch` 会增加哪些行**;没有读不到的行时没有这一行:

```
tip: mcpp info mcpplibs.cmdline --fetch downloads the package and adds its kind, features,
dependencies, modules and sheet
tip: mcpp info mcpplibs.cmdline --fetch adds its kind, features, dependencies, modules and sheet
```

内联形式的包只列 `modules and sheet`。提供者的包没有可取回的行,因而从不出现这一行。
Expand Down
11 changes: 8 additions & 3 deletions .github/tools/termux_fresh_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ emulator-run)
A=/data/data/com.termux/files
adb wait-for-device
adb install -r "$WORK/termux.apk" >/dev/null
adb shell am start -n com.termux/com.termux.app.TermuxActivity >/dev/null
for _ in $(seq 1 60); do
adb shell run-as com.termux ls "$A/usr/bin/sh" >/dev/null 2>&1 && break
# The app unpacks its userland when its activity first runs. Once (2026-12-06) nothing was
# unpacked 300 s after the one start and the run then failed as if mcpp had printed nothing,
# so the start is repeated each minute, and a userland that never appears is named as such.
ready=0
for i in $(seq 1 120); do
[ $((i % 12)) = 1 ] && adb shell am start -n com.termux/com.termux.app.TermuxActivity >/dev/null 2>&1 || true
adb shell run-as com.termux ls "$A/usr/bin/sh" >/dev/null 2>&1 && { ready=1; break; }
sleep 5
done
[ "$ready" = 1 ] || { echo "FAIL: Termux did not unpack its userland in 600 s; mcpp was not run" | tee -a "$S"; exit 1; }
for f in mcpp.tar.gz inside.sh; do
adb push "$WORK/$f" /data/local/tmp/ >/dev/null
adb shell chmod 644 "/data/local/tmp/$f"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-fresh-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ jobs:
# pipefail `tee` would report success for it (WS7, #729).
set -o pipefail
cd "$(mktemp -d)"
mcpp new abc1 --template mcpplibs.imgui 2>&1 | tee template.log
mcpp new abc1 --template mcpplibs.imgui --verbose 2>&1 | tee template.log
test -f abc1/mcpp.toml
grep -F 'namespace=mcpplibs name=imgui' template.log

Expand Down Expand Up @@ -510,7 +510,7 @@ jobs:
# pipefail `tee` would report success for it (WS7, #729).
set -o pipefail
cd "$(mktemp -d)"
mcpp new abc1 --template mcpplibs.imgui 2>&1 | tee template.log
mcpp new abc1 --template mcpplibs.imgui --verbose 2>&1 | tee template.log
test -f abc1/mcpp.toml
grep -F 'namespace=mcpplibs name=imgui' template.log

Expand Down Expand Up @@ -751,7 +751,7 @@ jobs:
run: |
$tmp = New-TemporaryFile | ForEach-Object { Remove-Item $_; New-Item -ItemType Directory -Path $_ }
Set-Location $tmp
mcpp new abc1 --template mcpplibs.imgui 2>&1 | Tee-Object -Variable templateOutput
mcpp new abc1 --template mcpplibs.imgui --verbose 2>&1 | Tee-Object -Variable templateOutput
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
if (!(Test-Path abc1/mcpp.toml)) { exit 1 }
if (-not (($templateOutput -join "`n") -match 'namespace=mcpplibs name=imgui')) { exit 1 }
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,40 @@
> Each `## [<version>]` section is that release's notes. Entries are written in English
> from 2026.9.28.3 on; earlier entries remain as written.

## [2026.12.6.2] - 2026-12-06

### Changed

- On a terminal, a closing `tip:` stands one blank line below a block of results (a report, a
list, a card), and a tip is one short sentence: `mcpp info <name> shows a package; mcpp add
<name> adds it` after `search`; the table a package goes to is the line `add` prints, the rows
`--fetch` adds are the card's (SPEC-012 §3.1).
- `mcpp remove` names the package's full identity, as `add` does (`Removed mcpplibs.cmdline from
[dependencies]`). `toolchain list` sizes its columns by their widest cell, so a long target or
toolchain no longer runs into the next column, and writes `-` for a row with no toolchain; the
`info` card cuts a row at a terminal's edge with `...`, as `search` does.
- openkal-platform 0.32.3 is the default platform of the openkal rows: the openkal 0.26.2 family
(`openkal.secret`), openkal-image 0.7.4 and openkal-musl 0.30.6. mcpplibs.os 0.4.10 asks for that
family (openkal-linux 0.27.4, openkal-macos 0.24.3, openkal-windows 0.23.3), which 0.32.1's version
group refused (`openkal-windows is requested as '>=0.23.3, <0.24.0' by mcpplibs.os@0.4.10`).

### Fixed

- On Linux, a text over 256 bytes whose reader is gone (`mcpp --help | head -1`, a sheet, a JSON
envelope, `--protocol-version`, a generated file's text) ends mcpp by SIGPIPE, 141 to a shell, as a
closed reader ends a shorter one; before, mcpp ended in `std::terminate` with
`terminate called after throwing an instance of 'std::system_error'`. libstdc++ 16's `std::print`
on musl writes its buffer again after a refused write; mcpp writes a whole result in one write,
and mcpplibs.cmdline 0.4.1 writes the help, the sheets and a completion so. `--help` reached it in
2026.12.6.1, the others before (mcpp#1027).
- A root's `override = true` of a package the platform's version group lists is the project's
choice throughout: every request of the package, a dependency's too, takes it, and the check
after the walk accepts the version it chose; the group's version is named once in the warning.
A member a build selects is the root of its build, so its overrides answer the graph's requests;
two declarations that override one package differently are refused naming both. Before, the
warning announced the override and a dependency's request, or the check after the walk, refused
it (mcpp#1045; SPEC-013 §7.5, SPEC-004 §12).

## [2026.12.6.1] - 2026-12-06

### Added
Expand Down
12 changes: 9 additions & 3 deletions docs/05-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,12 @@ repository the request names:
mcpplibs.os = { version = "0.4.4", override = true }
```

- **Where it holds.** On the root's tables and on `[workspace.dependencies]`,
- **Where it holds.** On the root's tables, on `[workspace.dependencies]`,
which governs every plan of the workspace's members (declaring a package
there does not make a member depend on it). `[dependencies]` governs the
there does not make a member depend on it), and on the tables of each member
a build selects, the root of its build *(2026.12.6.2+; before, a member's
override answered its own request only)*. Two declarations that override one
package with different versions or sources are refused, naming both. `[dependencies]` governs the
build's graph and the tests'; `[dev-dependencies]` the tests' only;
`[build-dependencies]` the build programs' only. A library that writes it is
told that it is ignored: the decision is the project's.
Expand All @@ -283,7 +286,10 @@ mcpplibs.os = { version = "0.4.4", override = true }
`--locked` reads the marker as part of the recorded resolution.
- **The platform's version group.** An override of a package the group lists
is taken, with a warning that names the group's version: the platform states
the defaults, and the project may choose another.
the defaults, and the project may choose another. Every request of the
package, a dependency's too, takes it, and so does the check after the walk
*(2026.12.6.2+; before, a dependency's request or that check refused the
version the warning had announced)*.
- **When it is needed.** Two version requests that no SemVer merge reconciles
are refused naming both, and the refusal ends with the line that overrides
the package. Two requests of one build program's resolution are refused the
Expand Down
3 changes: 2 additions & 1 deletion docs/09-commands-by-scenario.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ Libraries (4):
compat.imgui 1.93.0 Dear ImGui immediate-mode GUI library core sources
mcpplibs.mwrap.imgui 1.93.0 imgui-m upstream-preserving C++23 module wrapper
ocornut.imgui 1.93.0 Dear ImGui 1.92.8 core and GLFW/OpenGL3 backend modules for mcpp (import imgui.core;)
tip: mcpp info <name> shows one package; mcpp add <name> adds it to [dependencies]

tip: mcpp info <name> shows a package; mcpp add <name> adds it
```

Within a section, the name that is the word comes first, then names that begin
Expand Down
2 changes: 1 addition & 1 deletion docs/50-machine-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ installation, which is located on the machine rather than installed by mcpp. A
target row is `{target, note, toolchain, pin, status, default}`, and `status` is
one of `installed` / `available` / `via dependency graph` / `planned`.
A target row also carries `platform` (2026.10.27.1+): the platform package the
target table selects for it (`mcpplibs.openkal-platform@0.32.1` from 2026.11.23.1, `@0.31.2` from 2026.11.20.1, `@0.31.0` in 2026.11.19.1, `@0.29.2` in 2026.11.18.1, `@0.29.1` from 2026.11.17.2, `@0.28.0` from 2026.11.15.1, `@0.27.1` from 2026.11.12.1, `@0.26.0` in 2026.11.10.2, `@0.25.0` in 2026.11.10.1, `@0.24.4` from 2026.11.8.1, `@0.24.3` in 2026.11.7.2; the series `^0.24` in 2026.11.7.1), or `null`.
target table selects for it (`mcpplibs.openkal-platform@0.32.3` from 2026.12.6.2, `@0.32.1` from 2026.11.23.1, `@0.31.2` from 2026.11.20.1, `@0.31.0` in 2026.11.19.1, `@0.29.2` in 2026.11.18.1, `@0.29.1` from 2026.11.17.2, `@0.28.0` from 2026.11.15.1, `@0.27.1` from 2026.11.12.1, `@0.26.0` in 2026.11.10.2, `@0.25.0` in 2026.11.10.1, `@0.24.4` from 2026.11.8.1, `@0.24.3` in 2026.11.7.2; the series `^0.24` in 2026.11.7.1), or `null`.

**`toolchain` and `pin` are not the same field twice.** `toolchain` is what
the row is associated with — the installed payload on an installed row, the
Expand Down
6 changes: 3 additions & 3 deletions docs/specs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
| [SPEC-001](package-identity.md) | 包身份(`package.namespace` / `package.name`)、`[dependencies]` 选择器与匹配机制 | 评审中 v1.15 | 2026-12-05 | mcpp >= 0.0.106;§3.5 与 §10.4 mcpp >= 2026.11.19.1;§4.5、§3.5 的 `installed_manifest` 与 §10.4 第 7 条 mcpp >= 2026.11.21.1;§10.5 mcpp >= 2026.12.4.1 |
| [SPEC-002](target-side.md) | 目标侧模型与能力声明(`mcpp:` 保留命名空间、五层、三条规则、目标侧执行、一个进程一套 C++ 运行时) | 评审中 v1.13 | 2026-11-27 | mcpp >= 2026.8.24.2;§2.4 与 §6 mcpp >= 2026.10.24.1;§2.2 的对象形式与 §7 mcpp >= 2026.10.26.1;§2.5 与 §3.8 mcpp >= 2026.11.10.1;§3.6 以目标的解析判断 mcpp >= 2026.11.19.1;§3.9 与 §3.10 mcpp >= 2026.11.23.1;§3.11 mcpp >= 2026.11.27.1 |
| [SPEC-003](exit-codes.md) | 退出码契约(分类、语义、稳定性承诺) | 评审中 v1.2 | 2026-10-26 | mcpp >= 2026.9.1.1;`5` 与信号 mcpp >= 2026.10.26.1 |
| [SPEC-004](manifest-semantics.md) | `mcpp.toml` 的平面划分、条件化形状、解析轴与命名规约 | 草案 v1.32 | 2026-12-06 | 条件化形状 mcpp >= 2026.8.29.1;目标轴 mcpp >= 2026.9.6.4;`linkage` 默认值 mcpp >= 2026.9.15.2;链接 flag 的词读法 mcpp >= 2026.9.26.2;条件化的 `dialect_cxxflags` 与 `-p` 的包身份 mcpp >= 2026.9.28.1;条件表按具体程度生效 mcpp >= 2026.9.28.2;平台前缀规约 mcpp >= 2026.10.5.1;根包的继承、根位置的 profile、链接 flag 的作用域、链接期优化与导出发现 mcpp >= 2026.10.5.2;架构段的 `x86` 即 `i686` mcpp >= 2026.10.5.3;前缀即语义与工作空间层 mcpp >= 2026.10.10.1;依赖的库与配置(§12) mcpp >= 2026.10.11.1;值的四档层次与 `run_under` mcpp >= 2026.10.24.1;§12 第 3 条一个程序一个版本 mcpp >= 2026.11.19.1;§9 第 21 至 23 条与 §16 mcpp >= 2026.11.21.1;v1.29 条款 mcpp >= 2026.11.23.1;§9 第 24 条、§11 第 7 与 8 条、§17 mcpp >= 2026.11.27.1;v1.31 mcpp >= 2026.12.4.1;v1.32 mcpp >= 2026.12.6.1 |
| [SPEC-004](manifest-semantics.md) | `mcpp.toml` 的平面划分、条件化形状、解析轴与命名规约 | 草案 v1.33 | 2026-12-06 | 条件化形状 mcpp >= 2026.8.29.1;目标轴 mcpp >= 2026.9.6.4;`linkage` 默认值 mcpp >= 2026.9.15.2;链接 flag 的词读法 mcpp >= 2026.9.26.2;条件化的 `dialect_cxxflags` 与 `-p` 的包身份 mcpp >= 2026.9.28.1;条件表按具体程度生效 mcpp >= 2026.9.28.2;平台前缀规约 mcpp >= 2026.10.5.1;根包的继承、根位置的 profile、链接 flag 的作用域、链接期优化与导出发现 mcpp >= 2026.10.5.2;架构段的 `x86` 即 `i686` mcpp >= 2026.10.5.3;前缀即语义与工作空间层 mcpp >= 2026.10.10.1;依赖的库与配置(§12) mcpp >= 2026.10.11.1;值的四档层次与 `run_under` mcpp >= 2026.10.24.1;§12 第 3 条一个程序一个版本 mcpp >= 2026.11.19.1;§9 第 21 至 23 条与 §16 mcpp >= 2026.11.21.1;v1.29 条款 mcpp >= 2026.11.23.1;§9 第 24 条、§11 第 7 与 8 条、§17 mcpp >= 2026.11.27.1;v1.31 mcpp >= 2026.12.4.1;v1.32 mcpp >= 2026.12.6.1;v1.33 mcpp >= 2026.12.6.2 |
| [SPEC-005](build-database.md) | 构建数据库:`mcpp emit build-database` 的内容、取值规则与不写工程目录的保证 | 评审中 v1.10 | 2026-11-23 | mcpp >= 2026.9.15.1;v1.3 条款 mcpp >= 2026.9.26.2;v1.4 条款 mcpp >= 2026.9.27.1;v1.5 条款 mcpp >= 2026.9.28.1;v1.6 条款 mcpp >= 2026.9.29.5;v1.7 条款 mcpp >= 2026.9.30.2;v1.8 条款 mcpp >= 2026.10.11.1;v1.10 条款 mcpp >= 2026.11.23.1 |
| [SPEC-006](toolchain-management.md) | 工具链管理:身份、来源、选择与载荷契约 | 草案 v0.14 | 2026-11-23 | 逐条标注;已实现条款 mcpp >= 2026.9.24.1;§3.7 mcpp >= 2026.9.28.1;§3.7.1 mcpp >= 2026.9.28.2;§2.2.1 与 §3.3 的非缺省来源 mcpp >= 2026.10.1.3;§3.8 mcpp >= 2026.10.8.1;§3.9 至 §3.11 mcpp >= 2026.10.24.1;v0.11 条款 mcpp >= 2026.11.10.1;v0.14 条款 mcpp >= 2026.11.23.1 |
| [SPEC-007](build-plugins.md) | 构建插件:配置、施工与校验的分工,运行时与规划期的义务 | 草案 v0.17 | 2026-12-05 | 逐条标注;mcpp >= 2026.9.26.2;v0.3 条款 mcpp >= 2026.9.27.1;v0.4 条款 mcpp >= 2026.9.28.1;v0.5 条款 mcpp >= 2026.9.28.2;v0.6(§9)mcpp >= 2026.9.28.3;R3.9、R3.10 mcpp >= 2026.10.10.1;§10 mcpp >= 2026.10.11.1;§3.1 协议 18 mcpp >= 2026.11.5.1;协议 19 mcpp >= 2026.11.16.1;协议 20、R10.7 mcpp >= 2026.11.19.1;协议 21、R10.8–R10.10 mcpp >= 2026.11.21.1;v0.17 mcpp >= 2026.12.4.1 |
| [SPEC-008](library-interface.md) | 库的接口:公开模块、发布闭包与两种形态的一致 | 草案 v0.2 | 2026-10-11 | 第一阶段(只警告)mcpp >= 2026.9.28.3;v0.2 mcpp >= 2026.10.11.1 |
| [SPEC-009](toolchain-maintenance.md) | 工具链的支持与维护:版本线、默认值、来源、移动与退役 | 草案 v0.7 | 2026-11-21 | 逐条标注;本版只有规范,多数条款未实现;§6.4 mcpp >= 2026.10.8.1 |
| [SPEC-010](home-initialization.md) | home 选择、单跳入口、初始化、网络边界、镜像的初值与网络问题的提示、单次运行的 `--home` 与来自目录的 home | 草案 v0.4 | 2026-12-06 | mcpp >= 2026.10.19.1;网络能力逐条标注;§6 mcpp >= 2026.10.26.1、xlings >= 2026.10.26.1;§5 镜像与提示 mcpp >= 2026.12.4.1;§5 查询的联网 mcpp >= 2026.12.6.1 |
| [SPEC-011](concurrency.md) | 并发运行:三段、构建目录锁与计划的锁、等待的报告与上限、原子发布、`mcpp.lock` 的乐观写入、取消;编译执行器的恢复、发布、记录与文本 | 评审中 v1.5 | 2026-12-05 | mcpp >= 2026.10.26.1;§5.1 mcpp >= 2026.11.7.1;§5.1 第 6 条的不可观察单元与第 8 至 12 条 mcpp >= 2026.11.19.1;§2 第 7 至 11 条、§2.1、§2.2、§5.1 第 13 条 mcpp >= 2026.12.4.1 |
| [SPEC-012](human-output.md) | 面向人的输出:两条流、两种介质、行的种类、颜色、程序的文本 | 评审中 v1.2 | 2026-12-06 | mcpp >= 2026.10.26.1;§5 mcpp >= 2026.11.19.1;§3.1 与 §4 的角色 mcpp >= 2026.12.6.1 |
| [SPEC-013](platforms.md) | 平台:`[platform]` 的七组键、版本组与 `hosted`,三种写法与层次,目标图与宿主图的选择,`cfg(platform)`,依赖图的补全,链接、命名与封装,运行器与载体,平台阶段与协议 17 | 评审中 v1.17 | 2026-11-23 | mcpp >= 2026.10.27.1;§10 的执行宿主与 §11 的载体架构 mcpp >= 2026.10.29.1;§7.5 版本组参与解析与 §14 平台系列 mcpp >= 2026.11.7.1;§14 内置平台为确切版本 mcpp >= 2026.11.7.2;v1.7 条款 mcpp >= 2026.11.10.1;§14 索引的平台列 mcpp >= 2026.11.17.1;§14 系列取可用的最新版本与 §15.1 的 `+b` 条目 mcpp >= 2026.11.19.1;v1.17 条款 mcpp >= 2026.11.23.1 |
| [SPEC-012](human-output.md) | 面向人的输出:两条流、两种介质、行的种类、颜色、程序的文本 | 评审中 v1.3 | 2026-12-06 | mcpp >= 2026.10.26.1;§5 mcpp >= 2026.11.19.1;§3.1 与 §4 的角色 mcpp >= 2026.12.6.1;§3.1 第 4 条的空行 mcpp >= 2026.12.6.2 |
| [SPEC-013](platforms.md) | 平台:`[platform]` 的七组键、版本组与 `hosted`,三种写法与层次,目标图与宿主图的选择,`cfg(platform)`,依赖图的补全,链接、命名与封装,运行器与载体,平台阶段与协议 17 | 评审中 v1.18 | 2026-12-06 | mcpp >= 2026.10.27.1;§10 的执行宿主与 §11 的载体架构 mcpp >= 2026.10.29.1;§7.5 版本组参与解析与 §14 平台系列 mcpp >= 2026.11.7.1;§14 内置平台为确切版本 mcpp >= 2026.11.7.2;v1.7 条款 mcpp >= 2026.11.10.1;§14 索引的平台列 mcpp >= 2026.11.17.1;§14 系列取可用的最新版本与 §15.1 的 `+b` 条目 mcpp >= 2026.11.19.1;v1.17 条款 mcpp >= 2026.11.23.1;v1.18 条款 mcpp >= 2026.12.6.2 |
| [SPEC-014](packaging.md) | 打包与分发:链接、闭包、容器三个维度与构建腿,腿的合并,暂存树与 `mcpp-package.json`,平台的树、运行覆盖、单文件、polyglot、容器列表、签名、压缩、合并与分发描述 | 评审中 v2.9 | 2026-12-05 | mcpp >= 2026.10.31.1;逐条标注;v2.2 条款 mcpp >= 2026.11.10.1;v2.9 mcpp >= 2026.12.4.1 |
| [SPEC-015](target-sets.md) | 目标集合与腿:集合的写法与展开,命令对多条腿的语义,串行规划与一起构建,测试归档,机器输出 | 评审中 v1.0 | 2026-10-30 | mcpp >= 2026.10.30.1 |
| [SPEC-016](targets-and-providers.md) | 目标与提供者:行、提供者、选择规则、平台定义的行、C 环境与执行、报告、机器输出与锁 | 评审中 v1.10 | 2026-11-27 | mcpp >= 2026.11.9.1;v1.1 条款 mcpp >= 2026.11.10.1;v1.9 条款 mcpp >= 2026.11.23.1;v1.10 条款 mcpp >= 2026.11.27.1 |
Expand Down
Loading
Loading