refactor(asio): make module package canonical#109
Merged
Conversation
wellwei
force-pushed
the
refactor/asio-module
branch
from
July 21, 2026 07:31
3972203 to
239531f
Compare
Sunrisepeak
requested changes
Jul 21, 2026
| -- `asio/coroutine.hpp`、`asio/streambuf.hpp`。 | ||
| package = { | ||
| spec = "1", | ||
| namespace = "", |
Member
There was a problem hiding this comment.
缺少命名空间 以及文件名命名 chriskohlhoff.asio.lua
package = {
spec = "1",
namespace = "chriskohlhoff",
name = "asio",
description = "Standalone asio exposed as the C++23 module asio (separate compilation)",
licenses = {"BSL-1.0"},
wellwei
added a commit
to wellwei/mcpp-index
that referenced
this pull request
Jul 24, 2026
- Replace chriskohlhoff.asio descriptor with PR mcpplibs#109 content (namespace="chriskohlhoff", name="asio" for dual resolution: mcpp add chriskohlhoff.asio@1.38.1 / mcpp add asio@1.38.1) - Remove compat.asio@1.38.1 header-only package and its consumer tests - Remove tests/examples/asio from workspace members - Update asio-module test comments to remove mirror references
wellwei
force-pushed
the
refactor/asio-module
branch
2 times, most recently
from
July 24, 2026 16:57
17f3d5c to
239531f
Compare
wellwei
added a commit
to wellwei/mcpp-index
that referenced
this pull request
Jul 24, 2026
…ontent Move pkgs/a/asio.lua -> pkgs/c/chriskohlhoff.asio.lua with namespace="chriskohlhoff" so consumers can use both: mcpp add chriskohlhoff.asio@1.38.1 (fully qualified) mcpp add asio@1.38.1 (short form) Update asio-module test project index accordingly.
wellwei
force-pushed
the
refactor/asio-module
branch
from
July 24, 2026 17:03
3233ade to
239531f
Compare
…ontent Move pkgs/a/asio.lua -> pkgs/c/chriskohlhoff.asio.lua with namespace="chriskohlhoff" so consumers can reference it as both chriskohlhoff.asio@1.38.1 and asio@1.38.1. Update asio-module test project index accordingly.
Sunrisepeak
added a commit
that referenced
this pull request
Jul 25, 2026
#109 把 pkgs/c/chriskohlhoff.asio.lua 的 name 从 "chriskohlhoff.asio" 改成 "asio"(namespace 不变),这是该 commit 对描述符的唯一功能性改动, 其余全是注释重写。结果三平台 workspace job 全部在 tests/examples/asio-module 上失败: E_NOT_FOUND: package 'chriskohlhoff:chriskohlhoff.asio@1.38.1' not found 原因是 mcpp 内部两条规则对同一份描述符的口径不一致:身份归一化层 (manifest/xpkg.cppm canonical_xpkg_identity)认为 split 形式 (namespace="chriskohlhoff" + name="asio")与 FQN 形式等价、都合法, 而安装目标构造层(build/prepare.cppm)硬假设 name 字面值就等于 ns + "." + shortName。xlings/libxpkg 按前者的 name 字面值建索引 key (entries[package.name] = "asio"),mcpp 却拿 "chriskohlhoff.asio" 去点名, 两者永远不相交。 实测四种消费端写法(点式选择器、ns 表内点式、default 索引裸名、别名索引 裸名)全部无解 —— ns 被身份闸门钉死、短名被 xpm 版本表钉死,fqname 恒为 chriskohlhoff.asio 而 key 恒为 asio。等价约束是 name 必须 == namespace + "." + <短名>,只能在描述符里修。 改动: * pkgs/c/chriskohlhoff.asio.lua — name 写回 FQN 形式(与索引内其余 47 个 namespaced 包一致)。文件路径、namespace、消费端 mcpp.toml 均不动。 * pkgs/t/tensorvia-cpu.lua — 同类隐患(ns="aimol" + name="tensorvia-cpu"), 今天没被任何 workspace member 消费所以没暴露,但同样装不上;一并修正。 该文件是 `mcpp emit xpkg` 生成后手工补了 namespace 才落入 split 形式。 * tests/check_package_name.lua + validate.yml rule 5 — namespace 非空时 强制 name 以 "<namespace>." 开头。lint 秒级拦下,不再让这类错误跑满 三平台一小时后才炸。 验证(CI 钉住的 mcpp 0.0.102 + vendored xlings 0.4.67,冷 store 冷索引缓存): tests/examples/asio-module → 5 passed; 0 failed。lint 全量重放 exit 0, 负向测试(把 name 改回 split 形式)如期报错。 上游已提 mcpp-community/mcpp#278:mcpp 要么构造 target 时用描述符声明的 name(loadVersionDep 里 luaContent 已在作用域内),要么收紧规范让 `mcpp xpkg parse` 直接拒绝 split 形式。本 lint 是上游对齐前索引侧的守卫。
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.
Summary
compat.asio@1.38.1header-only package and its consumer testschriskohlhoff.asiopackage identity with canonical default-rootasio@1.38.1Consumer contract
compat.asio@1.38.1andchriskohlhoff.asio@1.38.1are removed without aliases. The canonical package is module-only.Validation
mcpp 0.0.101mcpp test -p asio-module: 5 passed, 0 failedLinux and Windows module coverage is delegated to PR CI.
No archive URL, SHA-256, mirror, generated wrapper, source list, feature, define, platform flag, mcpp core behavior, or unrelated documentation changes.