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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@

### 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 的模板同形)。
Expand Down
2 changes: 1 addition & 1 deletion docs/mwrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ The pinned client can report duplicate candidates when a workspace mixes full pr

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. The Git and published pkgs/mwrap directory layout remains identical.
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.

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/mwrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ tests/prepare_mwrap_indices.py 的 namespace 视图仅供隔离的单项目消
不能以独立项目通过证明混合 workspace 顺序可用。视图是不提交、不发布的输出,不是新的发布格式。

正常安装由 tests/mwrap/check_installed_template.py 独立验证:把完整 pkgs/index.toml 发布布局放进独立 MCPP_HOME 的单一内置索引,
下载真实且带校验的源码归档,执行 mcpp new,再原样构建/运行生成清单,不替换为 path 依赖。
下载真实且带校验的源码归档,执行 mcpp new,再原样构建/运行生成清单,不替换为 path 依赖。该 home 默认从 GLOBAL 镜像下载,`--mirror CN` 改用 CN(发布时的 CN 验收)。
Git 与发布的 pkgs/mwrap 目录始终一致。

运行库、插件、构建模块耦合的测试可能同时依赖多个候选 namespace。使用 `python3 tests/prepare_builtin_index.py --home <独立测试目录>`,将完整且字节不变的候选布局放入该测试 home 的唯一内置索引;成员用空 `[indices]` 覆盖旧 workspace 路由。自动更新候选 CI 同样使用此模式。不要将同一个完整 checkout 注册为多个项目别名。这只是测试 home 准备,不需要发布 staging、路径转换或修改 mcpp 引擎。
Expand Down
4 changes: 3 additions & 1 deletion tests/mwrap/check_installed_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def main():
parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1.1")
parser.add_argument("--deploy", action="store_true", help="pack, relocate and run the consumer; verify declared notices")
parser.add_argument("--published-index", action="store_true", help="refresh the real public index instead of staging this checkout")
parser.add_argument("--mirror", choices=("GLOBAL", "CN"), default="GLOBAL",
help="the download mirror of the run's home (mcpp self config --mirror)")
parser.add_argument("--home", type=Path, help="reuse a dedicated test home across independent installed consumers")
parser.add_argument("--run-arg", action="append", default=[])
parser.add_argument("--template", help="a named template of the package; omit for its default")
Expand All @@ -65,7 +67,7 @@ def main():
# mcpp 2026.10.26.1+ publishes only on request (mcpp docs/04, compile_commands);
# the request is the run's, so the template's manifest stays as rendered.
env = dict(os.environ, MCPP_HOME=str(home), MCPP_COMPILE_COMMANDS="compile_commands.json")
commands = [[args.mcpp, "self", "config", "--mirror", "GLOBAL"]]
commands = [[args.mcpp, "self", "config", "--mirror", args.mirror]]
if args.published_index:
commands.append([args.mcpp, "index", "update"])
commands += [[args.mcpp, "new", "--list-templates", args.package],
Expand Down
Loading