File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33> 本文件追踪 ` mcpp-community/mcpp ` 公开仓的版本演进。
44> 格式参考 [ Keep a Changelog] ( https://keepachangelog.com/zh-CN/1.1.0/ ) 。
55
6+ ## [ 0.0.40] — 2026-06-01
7+
8+ ### 修复
9+
10+ - 修复 project-local index 包的 xpm hook 工具依赖无法解析官方 ` xim `
11+ 索引的问题。项目级 xlings 配置现在会在 custom/local index 旁边显式暴露
12+ 官方 ` xim ` 索引,让 ` xim:python ` 等 hook 工具依赖可用。
13+
614## [ 0.0.39] — 2026-06-01
715
816### 修复
Original file line number Diff line number Diff line change 11[package ]
22name = " mcpp"
3- version = " 0.0.39 "
3+ version = " 0.0.40 "
44description = " Modern C++ build & package management tool"
55license = " Apache-2.0"
66authors = [" mcpp-community" ]
Original file line number Diff line number Diff line change @@ -674,10 +674,24 @@ bool ensure_project_index_dir(
674674 customRepos.emplace_back (name, spec.url );
675675 }
676676
677+ auto officialIndex = cfg.xlingsHome () / " data" / " xim-pkgindex" ;
678+ std::error_code ec;
679+ if (!customRepos.empty () && std::filesystem::exists (officialIndex / " pkgs" , ec)) {
680+ bool hasXim = false ;
681+ for (auto const & [name, _] : customRepos) {
682+ if (name == " xim" ) {
683+ hasXim = true ;
684+ break ;
685+ }
686+ }
687+ if (!hasXim) {
688+ customRepos.emplace_back (" xim" , officialIndex.generic_string ());
689+ }
690+ }
691+
677692 if (customRepos.empty ()) return false ; // nothing to do
678693
679694 auto dotMcpp = projectDir / " .mcpp" ;
680- std::error_code ec;
681695 std::filesystem::create_directories (dotMcpp, ec);
682696
683697 // Seed .xlings.json with the custom index entries.
@@ -725,7 +739,6 @@ bool ensure_project_index_dir(
725739 // project data dir. Expose the global official xim index there too, so
726740 // package deps like `xim:python@latest` can resolve without falling back
727741 // to unrelated remote index updates or system tools.
728- auto officialIndex = cfg.xlingsHome () / " data" / " xim-pkgindex" ;
729742 if (std::filesystem::exists (officialIndex / " pkgs" , ec)) {
730743 auto projectData = dotMcpp / " .xlings" / " data" ;
731744 auto projectOfficial = projectData / " xim-pkgindex" ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import mcpp.toolchain.detect;
1818
1919export namespace mcpp ::toolchain {
2020
21- inline constexpr std::string_view MCPP_VERSION = " 0.0.39 " ;
21+ inline constexpr std::string_view MCPP_VERSION = " 0.0.40 " ;
2222
2323struct FingerprintInputs {
2424 Toolchain toolchain;
Original file line number Diff line number Diff line change @@ -89,6 +89,21 @@ FAKE_REGISTRY="$TMP/fake-registry"
8989FAKE_LOG=" $TMP /fake-xlings.log"
9090FAKE_DIRECT_LOG=" $TMP /fake-xlings-direct.log"
9191mkdir -p " $FAKE_REGISTRY /data"
92+ mkdir -p " $FAKE_REGISTRY /data/xim-pkgindex/pkgs/p"
93+ cat > " $FAKE_REGISTRY /data/xim-pkgindex/pkgs/p/python.lua" << 'EOF '
94+ package = {
95+ spec = "1",
96+ name = "python",
97+ xpm = {
98+ linux = {
99+ ["3"] = {
100+ url = "https://example.invalid/python.tar.gz",
101+ sha256 = "0000000000000000000000000000000000000000000000000000000000000000",
102+ },
103+ },
104+ },
105+ }
106+ EOF
92107if [[ -d " $USER_MCPP /registry/data/xpkgs" ]]; then
93108 ln -s " $USER_MCPP /registry/data/xpkgs" " $FAKE_REGISTRY /data/xpkgs"
94109fi
121136
122137if [[ "${1:-}" == "install" ]]; then
123138 printf '%s\n' "$*" > "${FAKE_XLINGS_DIRECT_LOG:?}"
139+ if ! grep -q '"name": "xim"' "${XLINGS_PROJECT_DIR:?}/.xlings.json"; then
140+ echo "missing official xim index in project .xlings.json" >&2
141+ cat "${XLINGS_PROJECT_DIR:?}/.xlings.json" >&2 2>/dev/null || true
142+ exit 24
143+ fi
124144 if [[ ! -d "${XLINGS_PROJECT_DIR:?}/.xlings/data/compat/pkgs" \
125145 && ! -d "${XLINGS_PROJECT_DIR:?}/data/compat/pkgs" ]]; then
126146 echo "missing project local path index link" >&2
You can’t perform that action at this time.
0 commit comments