Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mcpplibs/mcpplibs-index
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: mcpplibs/mcpplibs-index
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feat/newer-versions-for-mcpp-era
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Aug 13, 2026

  1. feat: add mcpplibs-xpkg 0.0.57, capi-lua 0.0.3, tinyhttps 0.2.9

    三个包的最新版本此前都停在索引里够不到的位置:xpkg 0.0.41、capi-lua 0.0.2、
    tinyhttps 0.2.3。用 xmake 构建任何依赖这些库当前版本的工程,都会停在
    
        error: package(mcpplibs-xpkg): no available schemes with urls and versions
    
    **mcpplibs-xpkg 还需要索引替它提供构建描述。** 0.0.42 起 libxpkg 迁到了 mcpp,
    tarball 里是 `mcpp.toml` + `build.mcpp`,**一个 xmake.lua 都没有** —— 于是
    `package.tools.xmake` 无从下手。所以 `on_install` 在检测到没有 xmake.lua 时写一份
    再构建;老版本自带描述,那条路径原样不动。
    
    新版的目录也扁平化了:五个模块直接在 `src/` 下,不再是一个模块一个目录,因此
    补出来的描述是**一个** static target,而不是老版的五个。
    
    `mcpplibs.xpkg.lua_stdlib` 仍然是生成的(把 `src/lua-stdlib` 下每个 .lua 嵌成
    一个 string_view)。两个细节是从踩坑里来的:
    
    * 生成物写进 `src/`,让已有的 `src/*.cppm` glob 覆盖它。写到别处再事后
      `add_files` 会晚于模块扫描建立 provider 表,构建随后报
      `missing mcpplibs.xpkg.lua_stdlib dependency` —— 指着消费者,不提生成物。
    * .lua 清单用 **glob 而不是手抄**。0.0.41 嵌 10 个文件,0.0.57 是 11 个
      (`xim/libxpkg/subos.lua` 是新增的),抄一份就会静默漏掉它,并在三个文件之外
      的消费者里炸。排序保证输出逐字节可复现。
    Sunrisepeak committed Aug 13, 2026
    Configuration menu
    Copy the full SHA
    1e98f56 View commit details
    Browse the repository at this point in the history
  2. fix(cmdline): install the library target only

    `import("package.tools.xmake").install(package)` 不限定 target,于是把工程的
    examples 和 tests 一起编 —— 而 cmdline 的 xmake.lua 在 macOS 以外都
    `includes("examples", "tests")`。结果是任何没有预装 gtest 的机器上安装都会死在
    
        tests/cmdline_test.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
    
    索引里其他包(capi-lua、tinyhttps、xpkg)本来就都限定了 target,只有这个漏了。
    Sunrisepeak committed Aug 13, 2026
    Configuration menu
    Copy the full SHA
    3eb5936 View commit details
    Browse the repository at this point in the history
  3. fix(mcpplibs-xpkg): accept libxpkg's un-prefixed tags

    libxpkg 的 tag 命名在 0.0.42 前后变了:0.0.41 及更早是 `v0.0.41`,0.0.57 是
    `0.0.57`(没有 `v`)。包里只有带 `v` 的模板,于是新版本根本下不下来:
    
        we can also download these packages manually:
          - https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.57.tar.gz
    
    实测 `v0.0.57` 是 404、`0.0.57` 是 200。两种拼法都列上,xmake 按顺序尝试,
    404 的那条不花代价。sha256 本来就是按无前缀那个 tarball 算的,不用动。
    Sunrisepeak committed Aug 13, 2026
    Configuration menu
    Copy the full SHA
    4adc9af View commit details
    Browse the repository at this point in the history
Loading