From 8d94bb24fc60a75a69c30628109b8652d7cf5443 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Mon, 11 May 2026 08:30:15 +0800 Subject: [PATCH 1/3] chore: migrate deps to namespace syntax (mcpp 0.0.6) Updates mcpp.toml to use explicit namespace fields: - [package].namespace added - [package].name uses short name only - [dependencies.compat] / [dev-dependencies.compat] for non-modular libs - [dependencies.mcpplibs.capi] for C API wrappers --- .github/workflows/ci.yml | 10 +++++----- .xlings.json | 2 +- mcpp.toml | 23 ++++++----------------- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49fa296..acef8c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,22 +23,22 @@ jobs: "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" - - name: Install workspace tools (.xlings.json → mcpp 0.0.4) + - name: Install workspace tools (.xlings.json → mcpp 0.0.6) run: xlings install -y # Cache mcpp's self-bootstrapped sandbox (musl-gcc + binutils + # glibc + ninja + patchelf, ~800 MB). Toolchain set is pinned by - # mcpp 0.0.4, so a fixed key suffices. + # mcpp 0.0.6, so a fixed key suffices. - name: Cache mcpp sandbox uses: actions/cache@v4 with: - path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.4/registry - key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.4 + path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.6/registry + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.6 - name: Build with mcpp run: mcpp build - # mcpp 0.0.4 auto-prepends sandbox PATH (patchelf, ninja) for + # mcpp 0.0.6 auto-prepends sandbox PATH (patchelf, ninja) for # test binaries, so Linux elfpatch tests run without manual PATH # setup. Only macOS-specific tests (need install_name_tool) are # filtered — they can't run on a Linux runner. diff --git a/.xlings.json b/.xlings.json index b3b1fb4..f07ea0d 100644 --- a/.xlings.json +++ b/.xlings.json @@ -1,5 +1,5 @@ { "workspace": { - "mcpp": { "linux": "0.0.4" } + "mcpp": { "linux": "0.0.6" } } } diff --git a/mcpp.toml b/mcpp.toml index ef3a0bc..62c7aa7 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -1,27 +1,16 @@ [package] -name = "mcpplibs.xpkg" +namespace = "mcpplibs" +name = "xpkg" version = "0.0.39" -description = "C++23 reference implementation of the xpkg V1 spec — `import mcpplibs.xpkg;`" +description = "C++23 reference implementation of the xpkg V1 spec — import mcpplibs.xpkg;" license = "Apache-2.0" repo = "https://github.com/openxlings/libxpkg" [targets.xpkg] kind = "lib" -# Library-root convention picks `src/xpkg.cppm` automatically. -# The package ships five separate modules under the `mcpplibs.xpkg.*` -# namespace (loader, index, executor, lua_stdlib) — they sit alongside -# the primary `mcpplibs.xpkg` and all roll into the single libxpkg.a. -# -# `src/xpkg-lua-stdlib.cppm` is generated from `src/lua-stdlib/**/*.lua` -# at xmake build time (see `before_build` in xmake.lua); the current -# generated copy is committed so mcpp builds work without invoking the -# xmake codegen path. Regenerate via `xmake build mcpplibs-xpkg-lua-stdlib` -# whenever the .lua sources change. +[dependencies.mcpplibs.capi] +lua = "0.0.3" -[dependencies] -"mcpplibs.capi.lua" = "0.0.3" - -# `mcpp test` discovers tests/**/*.cpp + tests/**/*.cppm automatically. -[dev-dependencies] +[dev-dependencies.compat] gtest = "1.15.2" From 25c89a392dd01c5fc370e1a2637a53743fed4077 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Mon, 11 May 2026 08:48:35 +0800 Subject: [PATCH 2/3] ci: retrigger with fixed mcpp 0.0.6 --- .github/workflows/ci.yml | 10 +++++----- .xlings.json | 2 +- mcpp.toml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acef8c1..d1efcdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,22 +23,22 @@ jobs: "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" - - name: Install workspace tools (.xlings.json → mcpp 0.0.6) + - name: Install workspace tools (.xlings.json → mcpp 0.0.7) run: xlings install -y # Cache mcpp's self-bootstrapped sandbox (musl-gcc + binutils + # glibc + ninja + patchelf, ~800 MB). Toolchain set is pinned by - # mcpp 0.0.6, so a fixed key suffices. + # mcpp 0.0.7, so a fixed key suffices. - name: Cache mcpp sandbox uses: actions/cache@v4 with: - path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.6/registry - key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.6 + path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.7/registry + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.7 - name: Build with mcpp run: mcpp build - # mcpp 0.0.6 auto-prepends sandbox PATH (patchelf, ninja) for + # mcpp 0.0.7 auto-prepends sandbox PATH (patchelf, ninja) for # test binaries, so Linux elfpatch tests run without manual PATH # setup. Only macOS-specific tests (need install_name_tool) are # filtered — they can't run on a Linux runner. diff --git a/.xlings.json b/.xlings.json index f07ea0d..3f993c1 100644 --- a/.xlings.json +++ b/.xlings.json @@ -1,5 +1,5 @@ { "workspace": { - "mcpp": { "linux": "0.0.6" } + "mcpp": { "linux": "0.0.7" } } } diff --git a/mcpp.toml b/mcpp.toml index 62c7aa7..04b71ff 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -2,15 +2,15 @@ namespace = "mcpplibs" name = "xpkg" version = "0.0.39" -description = "C++23 reference implementation of the xpkg V1 spec — import mcpplibs.xpkg;" +description = "C++23 reference implementation of the xpkg V1 spec" license = "Apache-2.0" repo = "https://github.com/openxlings/libxpkg" [targets.xpkg] kind = "lib" -[dependencies.mcpplibs.capi] -lua = "0.0.3" +[dependencies] +"mcpplibs.capi.lua" = "0.0.3" -[dev-dependencies.compat] +[dev-dependencies] gtest = "1.15.2" From e5670e72edf14397b448f10fdf6f76bf1359d782 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Mon, 11 May 2026 19:15:53 +0800 Subject: [PATCH 3/3] fix(tests): drop tests/main.cpp (conflicts with gtest_main) --- tests/main.cpp | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 tests/main.cpp diff --git a/tests/main.cpp b/tests/main.cpp deleted file mode 100644 index 5ebbc76..0000000 --- a/tests/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -}