Repository navigation
fix(site)+feat(tomlplusplus): 文档站点死链修复;build.mcpp 中可 import tomlplusplus - #518
Merged
Merged
Conversation
- .xpkgindex.json:注册 descriptor-examples、openkal-compat(含 zh); repository-and-schema 挂 zh 译文;base_url 改为 https://mcpp.index.xlings.org - site-check:新增 tools/site/check_links.py,产物内任一内部死链即失败 - site-check 临时 pin xpkgindex 到 openxlings/xpkgindex#10(相对链接回退、 译文 guide 保持语言),合入后改回默认分支 修复 https://mcpp.index.xlings.org/zh/docs/contributing/descriptor-examples.md 等 9 页 23 条 404。
marzer.tomlplusplus 由 Form B 改为 Form A:mcpp = "*/mcpp.toml",install() 把 mcpp.toml([lib] path 显式声明导出面)与上游 master 的 src/modules/tomlplusplus.cppm 写入解包后的 v3.4.0 源码树。 - host module 需要 lib root,Form B 无法声明;mcpp 编译 host module 不带包的 include_dirs,模块单元改为相对自身 include 头文件(mcpp-community/mcpp#797) - 各平台 revision = 1,旧 Form B payload 自动重装(实测迁移通过) - 新成员 tests/examples/marzer.tomlplusplus-build-mcpp:build.mcpp 解析 build-config.toml 并注入 define;与项目侧测试分开(同包双角色 bug,见 #797)
同时让 CI 选中该成员:描述符变更按 mcpp.toml 中出现 'marzer.tomlplusplus' 字面量选成员,而 [dependencies.marzer] 写法不含该字面量。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
build.mcpp中可import tomlplusplus;:原 Form B 描述符作为 host module 会失败。项目侧的普通 import 不受影响。分析与方案见
.agents/docs/2026-10-11-site-doc-links-and-formb-host-module-plan.md。站点
.lua→ 包页;目录 → 其 README 对应的 guide;其他仓库文件 →{github}/blob|tree/HEAD/…;不存在则 warning。顺带修复译文 guide 的链接跳回英文页的问题descriptor-examples、openkal-compat未注册;repository-and-schema未挂 zh 译文.xpkgindex.json补齐site-check新增tools/site/check_links.py:产物内任一内部死链即失败base_url仍是mcpplibs.github.io(sitemap/feed)https://mcpp.index.xlings.orgtoml++
host-module 失败分两层(详见 mcpp#797):
[lib] path或src/<name>.cppm),而 Form B 词表里没有lib;include_dirs。改法:
mcpp = "*/mcpp.toml",由install()写入mcpp.toml(显式写[lib] path)和上游 master 的src/modules/tomlplusplus.cppm。基础源码仍是官方 v3.4.0 tarball,与 CN 镜像 sha256 一致。../../include/toml++/toml.hpp),这是对 L2 的临时绕过,#797 定案后恢复<toml++/toml.hpp>。revision = 1:本机已有旧 Form B payload 时会自动重装(本地实测迁移通过)。测试:
tests/examples/marzer.tomlplusplus-build-mcpp:build.mcpp中import tomlplusplus;,解析build-config.toml后注入 define,由测试断言;tests/examples/marzer.tomlplusplus(项目侧 import)不变,仍通过。[dependencies]和[build-dependencies](host-module)时,项目侧会丢 BMI。这是 mcpp 的 bug,已在 #797 下追加评论。已知限制:
revision从 mcpp 2026.9.27.1 起生效,而min_mcpp = 2026.9.18.3。在这两个版本之间的 mcpp 上,如果本机缓存着旧 payload,需要手动清除。