Skip to content

Commit 7359e9d

Browse files
authored
Merge branch 'mcpp-community:main' into main
2 parents ef5c04f + fe36012 commit 7359e9d

5 files changed

Lines changed: 30 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ jobs:
5656
- name: Bootstrap mcpp via xlings
5757
env:
5858
XLINGS_NON_INTERACTIVE: '1'
59+
XLINGS_VERSION: '0.4.25'
5960
run: |
60-
# xlings: install if not cached. The installer reads from
61-
# /dev/tty for an interactive prompt; XLINGS_NON_INTERACTIVE=1
62-
# skips that and runs `xlings self install` directly.
6361
if [ ! -x "$HOME/.xlings/subos/default/bin/xlings" ]; then
64-
curl -fsSL https://d2learn.org/xlings-install.sh | bash
62+
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
63+
curl -fsSL -o "/tmp/${tarball}" \
64+
"https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
65+
tar -xzf "/tmp/${tarball}" -C /tmp
66+
"/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install
6567
fi
6668
export PATH="$HOME/.xlings/subos/default/bin:$PATH"
6769
xlings --version

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,17 @@ jobs:
9595
- name: Bootstrap mcpp via xlings
9696
env:
9797
XLINGS_NON_INTERACTIVE: '1'
98+
# Pin xlings to a known-good version. The upstream install
99+
# script always grabs `latest` (no version override), so we
100+
# download + self-install manually to avoid broken releases.
101+
XLINGS_VERSION: '0.4.25'
98102
run: |
99103
if [ ! -x "$HOME/.xlings/subos/default/bin/xlings" ]; then
100-
curl -fsSL https://d2learn.org/xlings-install.sh | bash
104+
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
105+
curl -fsSL -o "/tmp/${tarball}" \
106+
"https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
107+
tar -xzf "/tmp/${tarball}" -C /tmp
108+
"/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install
101109
fi
102110
export PATH="$HOME/.xlings/subos/default/bin:$PATH"
103111
xlings --version

mcpp.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mcpp"
3-
version = "0.0.6"
3+
version = "0.0.7"
44
description = "Modern C++ build & package management tool"
55
license = "Apache-2.0"
66
authors = ["mcpp-community"]
@@ -19,6 +19,9 @@ toolchain = "gcc@15.1.0-musl"
1919
linkage = "static"
2020

2121
# Eat our own dog food: mcpp uses mcpplibs.cmdline for argument parsing.
22+
# NOTE: uses legacy dotted-key syntax so older bootstrapping mcpp versions
23+
# (pre-0.0.6, which don't understand [dependencies.<ns>] subtables) can
24+
# still parse this file during the self-host release build.
2225
[dependencies]
2326
"mcpplibs.cmdline" = "0.0.1"
2427

src/cli.cppm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,16 @@ prepare_build(bool print_fingerprint,
11861186
// Propagate lua-level namespace into the loaded manifest when
11871187
// the manifest itself doesn't carry one (Form A descriptors
11881188
// whose upstream mcpp.toml predates the namespace field).
1189+
// Guard: if the manifest's name already starts with luaNs+"."
1190+
// (e.g. name="mcpplibs.tinyhttps" with luaNs="mcpplibs"),
1191+
// the namespace is already embedded in the name — don't inject
1192+
// it again or the scanner will produce a double-prefixed
1193+
// qualified name like "mcpplibs.mcpplibs.tinyhttps".
11891194
if (manifest->package.namespace_.empty() && !luaNs.empty()) {
1190-
manifest->package.namespace_ = luaNs;
1195+
auto prefix = luaNs + ".";
1196+
if (!manifest->package.name.starts_with(prefix)) {
1197+
manifest->package.namespace_ = luaNs;
1198+
}
11911199
}
11921200

11931201
return std::pair{effRoot, std::move(*manifest)};
@@ -3290,7 +3298,7 @@ int run(int argc, char** argv) {
32903298
std::string_view a = argv[1];
32913299
if (a == "--help" || a == "-h") { print_usage(); return 0; }
32923300
if (a == "--version" || a == "-V") {
3293-
std::println("mcpp {}", mcpp::toolchain::MCPP_VERSION);
3301+
std::println("mcpp {} - ", mcpp::toolchain::MCPP_VERSION);
32943302
return 0;
32953303
}
32963304
}

src/toolchain/fingerprint.cppm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import mcpp.toolchain.detect;
1818

1919
export namespace mcpp::toolchain {
2020

21-
inline constexpr std::string_view MCPP_VERSION = "0.0.6";
21+
inline constexpr std::string_view MCPP_VERSION = "0.0.7";
2222

2323
struct FingerprintInputs {
2424
Toolchain toolchain;

0 commit comments

Comments
 (0)