Skip to content

feat(index): adopt xlings 0.4.68 per-repo artifact source for mcpplibs (no more forced git for index sync) #269

Description

@Sunrisepeak

背景

xlings 0.4.68 落地了 openxlings/xlings#377:任何 index_repos 条目都可以声明自己的 artifact 来源(与 git 并存、可选模式),同时修复了 openxlings/xlings#378(compact::git CA 探测)与 shim env 盲追加导致的 GIT_SSL_CAINFO 损坏(openxlings/xlings#380)。

mcpplibs 只需在条目上加一个字段即可吃到 artifact 路径(0.4.49 的 adaptive mirror reorder + stall watchdog),git 自动降级为回退:

{
  "name": "mcpplibs",
  "url": "https://github.com/mcpp-community/mcpp-index.git",
  "artifact": "https://github.com/xlings-res/mcpp-index"   // 可选 "source": "auto"(默认)
}

发布端零改动:xlings-res/mcpp-index 现有布局(mcpp-index-pointers.json + v<sha> release + tarball)与 xlings 消费端已逐字节兼容(实测 v2e23e20:sha256 一致、pkgs/ 在根部、sole-entry key 兜底覆盖 mcppmcpplibs 的命名差异)。

实机验证过(Ubuntu x86_64,/etc/ssl/cert.pem 不存在的宿主):把上述 artifact 字段加进 ~/.mcpp/registry/.xlings.json 并将捆绑 xlings 升到 0.4.68 后,mcpp index update 成功,data/mcpplibs 从 git checkout 原子迁移为 artifact 管理(.git 消失、.xlings-index-version=2e23e20),不再被 git CA 问题打断。

建议的 mcpp 侧改动

  1. 默认配置模板 + seed 透传:config.cppmwrite_default_config_toml[index.repos."mcpplibs"] 增加 artifact = "https://github.com/xlings-res/mcpp-index";seed_xlings_json(name, url) pair 透传 artifact / source 两个新字段(xlings 端 schema 见 docs/spec/xlings-json-schema.md)。
  2. 存量迁移:registry .xlings.json 只在缺失时 seed,既有安装拿不到新字段——需要一个 migrate_xlings_json_index_names 同款的一次性迁移,给既有 mcpplibs 条目补 artifact 字段(旧版 xlings 读到该字段会安全忽略,向后兼容)。
  3. 捆绑 xlings 版本:pinned bundled xlings 升到 ≥ 0.4.68(低于此版本 artifact 字段被忽略、行为不变,不会出错,但吃不到收益)。
  4. (可选)[indices] 扩展:项目级 IndexSpec(已支持 url/rev/tag/branch/path)增加 artifact,让用户的项目自定义索引也能声明 artifact 来源。

参考

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions