Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
6fc9b51
ci: mcpp 2026.11.21.1 (validate, xpkgindex-update, openkal-compat, te…
Sunrisepeak Nov 22, 2026
8676bc2
test: the installed-template check reads the key a written prefix sel…
Sunrisepeak Nov 22, 2026
b91af75
fix(windows): compat.sdl2 and taskflow.taskflow compile under clang 2…
Sunrisepeak Nov 22, 2026
8055be3
workspace: each member states the index it tests through; the root st…
Sunrisepeak Nov 22, 2026
6c6f8b9
fix(windows): a static library states its static-API macro for every …
Sunrisepeak Nov 22, 2026
eb94289
mwrap: the 13 wrapper revisions whose templates write the selector un…
Sunrisepeak Nov 22, 2026
43bf532
mwrap: 14 more wrapper revisions whose templates write the selector u…
Sunrisepeak Nov 22, 2026
aa7d56f
mwrap: llamacpp b10069.2, whose template writes the selector unquoted
Sunrisepeak Nov 22, 2026
69ce9b2
ci: mcpp 2026.11.22.1 (validate, xpkgindex-update, openkal-compat, te…
Sunrisepeak Nov 22, 2026
bda7734
changelog: the round's entries (static-API macros, sdl2 and taskflow,…
Sunrisepeak Nov 22, 2026
e6255ad
compat.curand links libgcc_s from gcc-runtime; compat.libarchive sele…
Sunrisepeak Nov 22, 2026
f421638
mcpplibs.os 0.4.8: a link's own stamp
Sunrisepeak Nov 22, 2026
2d5058e
known-red: cuda-curand on the LLVM leg names mcpp#1009, the closure c…
Sunrisepeak Nov 22, 2026
e526a0d
ci: macos 3 -> 4 and windows 5 -> 6 workspace shards: the slowest of …
Sunrisepeak Nov 22, 2026
cf9eec0
ci: macos 4 -> 6 workspace shards and its timing rows measured: two o…
Sunrisepeak Nov 23, 2026
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
8 changes: 4 additions & 4 deletions .agents/skills/add-mcpp-index-package/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ description: Use when adding a new third-party library/package to the mcpp-index
6. **编写测试工程(workspace 成员)**:mwrap 使用 `tests/mwrap/<member>/`,传统包使用 `tests/examples/<short>/`(`short` 为包名去除 `compat.`/`mcpplibs.`
前缀后的结果;公开模块包用 `<name>-module`),并把它加进仓根 `mcpp.toml` 的 `[workspace].members`。
- 包含 `mcpp.toml` 与 `tests/*.cpp`,后者须包含**可失败的有效断言**(`return ok ? 0 : 1`)。
- 普通成员用一条 `[indices] <ns> = { path = "../../.." }` 将所消费命名空间重定向到 checkout。
不把同一个完整索引路径注册成多个 namespace:当前 xlings 会将同一实体报为歧义。
mwrap workspace 成员保留显式空 `[indices]` 表,由 `tests/run_members.sh` 将完整且字节不变的
- 普通成员用一条 `[indices] <ns> = { path = "../../.." }` 将所消费命名空间重定向到 checkout(消费 compat 的成员写
`compat`);仓根不写 `[indices]`。不把同一个完整索引路径注册成多个 namespace:mcpp 以 `index-location-named-twice` 拒绝。
mwrap workspace 成员不写 `[indices]`,由 `tests/run_members.sh` 将完整且字节不变的
checkout 索引放入测试 home 的唯一内置索引。未设置 MCPP_HOME 时使用 target/mwrap-test-home。
namespace 视图仅供隔离的单项目消费者;不能以独立项目通过证明混合 workspace 顺序可用。
正常发布布局另由 `tests/mwrap/check_installed_template.py` 在独立 MCPP_HOME 中使用单一完整索引验收。
运行库/插件/host-module 多 namespace 耦合时,优先用 `tests/prepare_builtin_index.py --home <独立测试 home>`
安装唯一完整内置索引,成员以空 `[indices]` 覆盖旧 workspace 路由。自动更新候选 CI 同样采用此方式,
安装唯一完整内置索引,成员不写 `[indices]`。自动更新候选 CI 同样采用此方式,
避免项目别名缓存相互污染;这是测试准备,不是发布 staging 或目录转换。
- 非全平台包按 `[target.'cfg(...)'.dependencies]` 门控依赖,测试源码在被门控掉的平台上
编译为 no-op `main`(`#ifdef __linux__ … #else int main(){return 0;} #endif` 模式)。
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openkal-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ env:
# run if this drifts from pins.toml. See the comment beside `mcpp` in
# pins.toml for why this pin, not just validate.yml's, is gated by the
# index floor.
MCPP_VERSION: "2026.11.18.1"
MCPP_VERSION: "2026.11.22.1"
# CROSS-VALIDATION BEFORE A RELEASE, NOT AFTER IT.
#
# Empty in an ordinary run, so this measurement keeps using the RELEASED
Expand Down
95 changes: 64 additions & 31 deletions .github/workflows/validate.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/xpkgindex-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:

env:
PYTHONUTF8: '1'
MCPP_VERSION: '2026.11.18.1'
MCPP_VERSION: '2026.11.22.1'
# CROSS-VALIDATION BEFORE A RELEASE: a candidate that needs an mcpp newer
# than the pin (its package states the floor) is built with mcpp built from
# this branch of mcpp-community/mcpp, as openkal-compat.yml measures with it.
Expand Down
46 changes: 42 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
- **mwrap 规范。** 上游库名取库本身的名字,不含仅区分语言的仓库后缀(abseil-cpp → abseil-m);同一翻译单元中 `#include`
在 `import` 之前;以 Clang 审计导出面;手工无法维护的导出面以记录提交、由 build.mcpp 生成(docs/mwrap.md)。
`tests/mwrap/check_installed_template.py` 新增 `--template`,以覆盖非默认模板。
- **mcpplibs.os 0.4.8。** `fs::stamp_of(node, false)` 不跟随链接,给出链接自身的大小与修改时间(openkal 的 `KAL_FS_NO_RESOLVE`),悬空的链接也有它自己的时间戳;缺省不变。mcpp 以它读取 xlings 存储的根的最后使用时间。GitHub 与 GitCode(mcpp-res/os)字节一致。
- **mcpplibs.os 0.4.7。** `machine::processor_model()` 给出系统所称的处理器型号(Linux 的 `/proc/cpuinfo`,内核不给出型号时为实现者与部件号;macOS 的 `machdep.cpu.brand_string`;Windows 注册表的 `ProcessorNameString`;映像与 wasm 模块无回答):同一标签的托管 runner 是处理器速度相差至多 1.6 倍的几种机器,跨机器比较的测量按它区分。`stdio::capture::take()` 分段取出被捕获的输出而不结束捕获;捕获不再刷新 openkal 的流(对文件即 `fsync`),在保留每个用例输出的运行器下 510 个用例的程序由 1.05 s 降为 0.03 s。GitHub 与 GitCode(mcpp-res/os)字节一致。
- **mcpplibs.os 0.4.6。** 新增 `mcpplibs.os.text`:把被启动程序写出的文本按其编码解码为 UTF-8。编码为 `utf8`,或 `console`(Windows 控制台程序的约定:写入管道或文件时用所附着控制台的输出代码页,没有控制台时用系统的 ANSI 代码页;以 cl.exe 与 link.exe 测得,mcpp-community/mcpp#970)。`valid_utf8` 把不是 UTF-8 的序列按最大子部分替换为 U+FFFD。`windows::console_text_code_page` 与 `windows::utf8_from_code_page` 是其下的两项事实。openkal 的范围不变。
- **openkal-platform 0.31.0:openkal 0.26 一族。** 平台的各层、载体、工具与各行使用 openkal 0.26.0 及其各实现(openkal-linux 0.27.0、openkal-macos 0.24.0、openkal-windows 0.23.0、openkal-freebsd 0.2.0、openkal-uefi 0.12.0、openkal-dos 与 openkal-dos-tools 0.2.0、openkal-svr4 0.3.0)、openkal-musl 0.30.0、openkal-llvm-runtime 0.21.0 与 openkal-image 0.7.0。System V 一行可以启动其他程序:openkal-svr4 0.3.0 声明 `openkal.process` 与 `openkal.space`,运行器为 ibcs-us 4.3-2。构建程序链接 mcpp.plugins 0.26.1(mcpplibs.os 0.4.5 接受 openkal 0.26);平台的引擎下界仍为 mcpp 2026.11.17.1。
Expand Down Expand Up @@ -194,6 +195,19 @@

### Changed

- **工作区不再陈述索引,每个成员陈述自己测试所经的索引。** 根 `mcpp.toml` 的 `[indices] compat = { path = "." }` 由位置读取
(2026.10.10.1 弃用,2027.1 移除);149 个成员改为各自写 `compat = { path = "<到检出的相对路径>" }`,与已以其他名字指向检出的
79 个成员同形;57 个 mwrap 成员与 5 个 mtest 示例为避开根的重定向而写的空 `[indices]` 删去。改用 `[workspace.indices]` 不可行:
它按名字合并,79 个成员会得到同一检出的两个名字,安装以 ambiguous 失败(mcpp 2026.11.22.1 起以 `index-location-named-twice`
拒绝)。29 个成员清单的依赖选择器去掉引号(父包与子包并存者除外)。`tests/test_prepare_mwrap_indices.py`、docs/mwrap.md、
docs/repository-and-schema.md 随之改写。
- **28 个封装包发布模板修订,模板写不加引号的选择器。** fribidi 1.0.16.1、imgui 1.92.8.1、libarchive 3.8.7.1、libpng 1.6.43.1、
lua 5.4.7.1、miniaudio 0.11.25.1、pocketpy 2.2.0.1、quickjs_ng 0.17.0.1、sdl3 3.4.18.1、xxhash 0.8.3.1、xz 5.8.3.2、zlib 1.3.2.1、
zstd 1.5.7.1、accesskit 0.23.1.1、box2d 3.2.0.1、concurrentqueue 1.0.5.1、dr_libs 2026.03.03.1、freetype 2.13.3.1、godot_cpp
10.0.0.1、harfbuzz 14.3.0.1、libc 17.0.0.1、libvpx 1.17.0.1、libwebp 1.5.0.1、llamacpp b10069.2、md4c 0.5.3.1、mimalloc 3.6.1.1、
opus 1.6.1.1、sheenbidi 3.0.0.1(各包最新标签的 `templates/**/mcpp.toml.in` 测得写 `"{{self.name}}"`)。原有 CN 镜像的包在
`mcpp-res/mwrap-<名>` 发布同一字节。llama.cpp-m 的 `mwrap-b10069.1` 打了标签而未发布(其发布门禁所在的 runner 映像换了 clang,
API 快照的读法不同),`b10069.2` 带同一改动。
- **compat.onnxruntime 以 `license_files` 陈述 SDK 的许可文件**(`LICENSE` 与 `ThirdPartyNotices.txt`)。mcpp 2026.11.17.1 在每种打包模式中
把它们放在 `share/licenses/compat.onnxruntime/`;此前由 `deploy` 放在程序旁的 `licenses/onnxruntime/`。包装的 LICENSE 与 NOTICE
仍由 mcpplibs.mwrap.onnxruntime 自己的 `deploy` 放在 `licenses/onnxruntime/wrapper/`。
Expand All @@ -203,6 +217,25 @@

### Fixed

- **compat.curand 在 LLVM 构建的程序上可加载。** `libcurand.so.10` 需要 `libgcc_s.so.1`;以 LLVM 构建的产物链接 compiler-rt 与
libunwind,不加载它,mcpp 的运行时闭包检查拒绝该程序(`libgcc_s.so.1 not found on the search path`,linux llvm 行的
cuda-curand 成员)。compat.curand 依赖 `xim:gcc-runtime`,并把其中的 `libgcc_s.so.1` 与 glibc 的兼容桩一同链接进库目录,
与 compat.sycl-runtime 同形。
- **compat.libarchive 去掉 Linux uapi 功能的条件改为 `cfg(all(linux, kernel-abi = "openkal"))`。** 此前的条件
`c-abi = "musl"` 本为 openkal 的图,也命中原生 musl 工具链(`musl-gcc`),而后者自带内核头文件;功能缺席的是内核接口这一层,
不是 C 库。macOS 上的 `-U__APPLE__` 同样改按 `kernel-abi` 选择。
- **Windows 上静态库为每个包含其头文件的单元陈述静态 API 宏(archive 与 libarchive-bundle 启动即崩溃的根因)。** `lzma.h` 与
`archive.h` 在未定义 `LZMA_API_STATIC`、`LIBARCHIVE_STATIC` 时声明 dllimport;使用方经 lld-link 为本地定义造的 `__imp_` 槽调用,
回收无引用节的链接(mcpp 2026.11.9.1 起测试的链接)丢弃槽后的函数,首次调用跳到映像首字节(退出 133)。MSVC 的 link.exe 保留
这些函数,lld-link 不保留(mcpp-community/mcpp#1002)。compat.xz、compat.libarchive、compat.fribidi(此前宏只在 Windows 的私有
cflags)与 compat.libcoro(此前为私有 `defines`)改为由 `default` 蕴含的 `staticlib` feature,与 compat.curl、compat.c-ares 同形;
compat.cpptrace、compat.libassert、compat.yaml-cpp 原以 `#include_next` 垫片传递宏,改为同一 feature,垫片删去(垫片不能用于
cl.exe)。docs/repository-and-schema.md 原称 feature 的 `defines` 只作用于包自身,与 mcpp 不符,已改正。windows-2022 上以修正复测,
两个成员通过。
- **compat.sdl2 与 taskflow.taskflow 在 clang 23 的 MSVC ABI 下编译(修订 1)。** clang 23 把 `_m_prefetch` 作为内建函数,SDL 2.32.10
的 `SDL_endian.h` 在该 ABI 下定义它,compat.sdl2 在 install() 中移植上游 SDL2 分支以 `!_SDL_HAS_BUILTIN(_m_prefetch)` 保护的一行;
taskflow 4.1.0 的 `tfprof.hpp` 以 `static inline` 定义两个命名空间作用域的函数,两个模块分区的全局模块片段各包含一次而修饰名相同,
taskflow.taskflow 在 install() 中改为 `inline`。
- **compat.c-ares:`CARES_STATICLIB` 传给使用方(Windows 上 gRPC 启动即崩溃的根因)。** 此前只有包自身以该宏编译,使用方看到的 `<ares.h>` 把每个入口声明为 `__declspec(dllimport)`,经 lld-link 本地补全的 `__imp_` 槽调用静态库(LNK4217)。lld-link 在不带 `/DEBUG` 时默认 `/OPT:REF`,该槽不保住它的定义:定义所在目标文件只因随后被丢弃的代码而载入时,定义被丢弃、槽内为映像基址。gRPC 的 `ares_library_init` 正是如此,`grpc_init` 跳到 PE 头(0xC0000005,mcpp 报 exit 133);四行 C 即可复现(llvm 23.1.3)。上游的 Bazel(`defines`)与 CMake(INTERFACE 定义)都把该宏传给依赖方;此处按 compat.curl 的写法以 `default` 隐含的 feature `defines` 传递。在装有旧 compat.c-ares 的 home 上实测生效,无需 packaging revision;gRPC 的模块测试在 Windows 默认链接参数下通过(grpc-m#10)。
- **mcpp.plugins 0.23.1。** `dist-apk` 把构建程序在输出目录(`mcpp::out_dir()`、`target/`)中生成的 Java 或 Kotlin 根只作为
`javac` 动作的输入,不再为其声明永远无法命中的重跑 glob,消除每次构建的警告。`latest` 指向 0.23.1
Expand Down Expand Up @@ -261,16 +294,21 @@
### Chore

- **已安装模板的检查可选镜像。** `tests/mwrap/check_installed_template.py` 新增 `--mirror {GLOBAL,CN}`(默认 GLOBAL);此前固定为 GLOBAL,发布时的 CN 验收只能手工执行。`--published-index --mirror CN` 下 xxhash-m 0.8.3 的封装归档首次即从 gitcode.com 取得。
- **已安装模板的检查:模板写引号键时只允许该弃用警告。** mcpp 2026.11.8.1 之前发布的 mwrap 模板以 `"{{self.name}}"` 写依赖键,
渲染为一个带引号的键;`--strict` 拒绝这一弃用读法,归档又不可改。检查在渲染出引号键时不加 `--strict` 构建,只允许该包的这条
弃用警告,其余警告仍失败;模板的下一版写不带引号的选择器后自动恢复严格构建(onnxruntime-m 1.25.1;opencv-m、ffmpeg-m 的模板同形)。
该检查同时按新的位置核对 SDK 的许可文件,并为本次运行请求项目根的编译数据库(`MCPP_COMPILE_COMMANDS`;mcpp 2026.10.26.1 起只在
- **已安装模板的检查拒绝写引号键的模板,并以 `--strict` 构建。** 引号键自 mcpp 2026.11.8.1 弃用、2027.2 移除;写它的 28 个封装包
各发布一个修订(见 Changed),检查以这些修订为对象,不再为引号键放行弃用警告。该检查同时按新的位置核对 SDK 的许可文件,并为本次运行请求项目根的编译数据库(`MCPP_COMPILE_COMMANDS`;mcpp 2026.10.26.1 起只在
请求时写出),模板生成的清单保持原样;`mcpp pack` 改用 `--pkg-format`。

- **mcpp.platforms 0.1.0 的条目列出每种宿主。** 条目此前只列 Linux,macOS 与 Windows 宿主无法安装该包
(`has no build for windows`),它服务的行在这两种宿主上无法经索引构建(mcpp e2e 1116 测得)。包是一份陈述,
各宿主使用同一个归档。 测试成员 `tests/examples/mcpp-platforms` 为这些行指名此版本;行由包自己的 CI 在三种宿主上构建。

- **CI 的 mcpp 由 2026.11.18.1 改为 2026.11.22.1**(validate、xpkgindex-update、openkal-compat 与 `tests/openkal/pins.toml`):
该版的默认平台为 openkal-platform 0.31.2,首次运行安装 gcc 16.2.0、ninja `1.13.2-mcpp.1` 与 patchelf 0.19.3,随带
xlings 2026.11.21.1;缓存的依赖只在其编译时所用的模块接口下取用;已安装工具链的配套载荷取 store 持有的第一个声明;
`[indices]` 中两项指向同一位置时拒绝(`index-location-named-twice`)。索引的客户端下界(`min_mcpp`)不变。该版命令行的 `@` 按写出的前缀选择
(`--template ...@1.3` 渲染 1.3 下最新的 1.3.1),`tests/mwrap/check_installed_template.py` 据此检查模板写入的版本落在
所请求的前缀之下,并读取所选版本的安装。

- **CI 的 mcpp 由 2026.11.17.2 改为 2026.11.18.1**(validate、xpkgindex-update 与 openkal-compat):该版的默认平台为
openkal-platform 0.29.2,行的对象格式与文件名读自数据(行、系统、格式的约定),mcpp.platforms 的 FreeBSD 行在 Windows
宿主上以行的名字构建。
Expand Down
14 changes: 7 additions & 7 deletions docs/mwrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ Templates are data, without execution hooks. With the pinned current mcpp,

```toml
[dependencies]
"{{self.name}}" = { version = "{{self.version}}", features = ["imgproc", "imgcodecs-png"] }
{{self.name}} = { version = "{{self.version}}", features = ["imgproc", "imgcodecs-png"] }
```

Quote the selector as one key; do not place it under another namespace table.
From mcpp 2026.11.8.1 a quoted key that needs no quotes is reported (and `--strict` refuses it); a template
tested with that client writes the same selector as a dotted key, `{{self.name}} = "{{self.version}}"`, which
names the same package. `tests/mwrap/check_installed_template.py` reads either form.
Write the selector unquoted, as a dotted key; do not place it under another namespace table.
A quoted key that needs no quotes is deprecated from mcpp 2026.11.8.1 (`--strict` refuses it) and
is removed in 2027.2. `tests/mwrap/check_installed_template.py` refuses a template that writes it,
and builds the rendered project with `--strict`.
Declare required features explicitly and keep the library version tied to
`{{self.version}}`. Test actual `mcpp new`, then build and run the generated
project. A source candidate may use an isolated preseeded installed-package
Expand Down Expand Up @@ -227,13 +227,13 @@ CI check before reporting merge/release readiness.

## Candidate index tests across namespaces

The pinned client can report duplicate candidates when a workspace mixes full project indices and namespace views. Mwrap workspace members retain an explicit empty `[indices]` table. `tests/run_members.sh` prepares one complete unchanged built-in candidate index before their tests; an unset MCPP_HOME uses the task-owned target/mwrap-test-home. CI prepares that candidate after refreshing the published registry. Keep the legacy workspace redirect semantics; `[workspace.indices]` merges entries and is not a mechanical spelling replacement.
The pinned client can report duplicate candidates when a workspace mixes full project indices and namespace views. Mwrap workspace members state no `[indices]`, and the workspace root states none for them: each other member states the index it tests through (`compat = { path = "<to the root>" }` for this checkout), since mcpp removes the positional reading of a root's `[indices]` in 2027.1 and `[workspace.indices]` merges with a member's entries. `tests/run_members.sh` prepares one complete unchanged built-in candidate index before their tests; an unset MCPP_HOME uses the task-owned target/mwrap-test-home. CI prepares that candidate after refreshing the published registry.

Namespace views created by tests/prepare_mwrap_indices.py remain available for isolated single-project consumers. Their descriptors preserve source bytes and SHA256 provenance. A standalone success does not certify a mixed workspace sequence. Views are ignored outputs, not a publication format.

Normal installed consumers are tested independently by tests/mwrap/check_installed_template.py: it copies the complete pkgs/index.toml publication layout into one isolated built-in index, downloads the real checksummed source archive, runs mcpp new and builds/runs the generated manifest without a path substitution. Its home downloads from the GLOBAL mirror unless `--mirror CN` names the other (the CN acceptance of a release). The Git and published pkgs/mwrap directory layout remains identical.

Coupled runtime/plugin/build-module consumers may require several candidate namespaces at once. Use `python3 tests/prepare_builtin_index.py --home <isolated-test-home>` to install the complete unchanged candidate layout as the test home's single built-in index; the member uses an empty `[indices]` table to override legacy workspace redirects. Updater candidate CI uses this mode too. Do not register the same full checkout through multiple project aliases. This is test-home preparation only: no publication staging, path conversion or mcpp engine change is required.
Coupled runtime/plugin/build-module consumers may require several candidate namespaces at once. Use `python3 tests/prepare_builtin_index.py --home <isolated-test-home>` to install the complete unchanged candidate layout as the test home's single built-in index; the member states no `[indices]`. Updater candidate CI uses this mode too. Do not register the same full checkout through multiple project aliases. This is test-home preparation only: no publication staging, path conversion or mcpp engine change is required.

For Linux consumers loading a C++ SDK through a C API, verify the C++ runtime contract as well as successful calls. The OpenCV/ORT integration exposed uncaught typed exceptions when a static runtime was embedded alongside the shared SDK runtime; `cxx_runtime = "toolchain-coupled"` fixed the same test. Templates must encode the verified contract and exercise a typed error path.

Expand Down
Loading
Loading