Skip to content

fix: Windows sub-index repo build failure#198

Merged
Sunrisepeak merged 5 commits intomainfrom
fix/windows-sub-index-build
Mar 8, 2026
Merged

fix: Windows sub-index repo build failure#198
Sunrisepeak merged 5 commits intomainfrom
fix/windows-sub-index-build

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

@Sunrisepeak Sunrisepeak commented Mar 8, 2026

Summary

  • Bump mcpplibs-xpkg 0.0.25 → 0.0.27 to fix Windows sub-index repo index building and install hooks
  • Add Windows e2e test (sub_index_search_test.ps1) for sub-index search + pkgindex-build
  • Add E2E-07 step to Windows CI workflow

Root Cause

On Windows, xlings update could not build sub-index repo indexes, and xlings install d2x:d2mcpp failed because os.cp/os.mkdir/etc. used Unix shell commands (cp -a, rm -rf, mkdir -p, mv) that don't exist on Windows.

Changes in libxpkg v0.0.26

  • os.files / os.isdir in build sandbox: pure C++ std::filesystem implementation (cross-platform)
  • run_pkgindex_build: platform-conditional null device (2>nul vs 2>/dev/null)

Changes in libxpkg v0.0.27

  • 6 new C++ os.* overrides replacing shell-based Lua implementations:
    • os.cp(src, dst) — recursive copy via std::filesystem::copy
    • os.trymv(src, dst) / os.mv — rename with cross-device fallback
    • os.tryrm(path) — recursive remove via std::filesystem::remove_all
    • os.mkdir(path) — nested directory creation via std::filesystem::create_directories
    • os.isfile(path) — file detection via std::filesystem::is_regular_file
    • os.iorun(cmd) — stdout capture with platform-correct stderr suppression
  • 6 new unit tests covering all os.* overrides

Test plan

  • Windows CI passes E2E-07 (sub-index search + pkgindex-build)
  • Linux CI passes existing sub-index tests unchanged
  • xlings update on Windows correctly builds d2x sub-index
  • xlings install d2x:d2mcpp -y works on Windows after update

🤖 Generated with Claude Code

Sunrisepeak and others added 5 commits March 9, 2026 01:01
- Bump mcpplibs-xpkg 0.0.25 -> 0.0.26 which fixes:
  - os.files build sandbox using ls/test (Unix-only) replaced with C++
    std::filesystem (cross-platform)
  - run_pkgindex_build using 2>/dev/null replaced with 2>/dev/null on Windows
- Add Windows e2e test for sub-index search with pkgindex-build.lua
- Add E2E-07 step to Windows CI workflow

Fixes: xlings update fails to build sub-index repo index on Windows
("The system cannot find the path specified" error from 2>/dev/null,
and os.files returning empty table due to ls -1 not existing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace file:/// URLs with plain forward-slash paths in
  xim-indexrepos.lua — git clone handles local paths directly
- Add diagnostic output: print xim-indexrepos.lua content, xlings
  update output, and xim-index-repos directory listing
- Check $LASTEXITCODE after xlings update

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite sub_index_search_test.ps1 to reuse the release test
infrastructure instead of creating custom fixtures with junctions.
Now tests d2x:d2mcpp install end-to-end, which validates the C++
os.files/os.isdir pkgindex-build fix on Windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds C++ implementations of os.cp, os.trymv, os.tryrm, os.mkdir,
os.isfile, os.iorun to fix Windows install hook failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Sunrisepeak Sunrisepeak merged commit 3cbde6b into main Mar 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant