Skip to content

release: 0.4.10 — Windows self-uninstall safety + build/runtime deps split + .tar.xz fix#252

Merged
Sunrisepeak merged 1 commit intomainfrom
release/0.4.10
May 1, 2026
Merged

release: 0.4.10 — Windows self-uninstall safety + build/runtime deps split + .tar.xz fix#252
Sunrisepeak merged 1 commit intomainfrom
release/0.4.10

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

Summary

Bumps VERSION from 0.4.9 to 0.4.10. Pure version-bump PR — all the actual fixes are already merged via #249 / #250 / #251.

Highlights since 0.4.9

  • fix(xim): refuse remove of running xlings with no other versions installed #250xlings remove xim:xlings no longer silently terminates on Windows when xlings has only one version installed. Three layered fixes: error_code overload at the throw sites, single-version self-removal guard with redirect to self uninstall, top-level catch in cli::run. Bonus: action-lambda rc threading via wrap_rc helper so every cmd_* exit code now propagates to the process exit code (was being squashed to 0 by cmdline lib's std::function<void(...)> action signature).
  • feat(xim): runtime / build deps split (libxpkg schema + resolver/installer kind propagation) #249 — Schema-level split between runtime_deps and build_deps in xpkg packages. Build deps land in xpkgs but never activate in the user's workspace — the consumer's install hook reaches them via pkginfo.build_dep("name") or injected env. Legacy deps = { ... } array form preserved via loader fan-out. Carries libxpkg 0.0.32 forward.
  • fix(build): libarchive uses xz (liblzma) instead of 7-zip lzma SDK for .tar.xz support #251.tar.xz / .tar.lzma extraction uses internal liblzma instead of fork-exec'ing the system xz binary at runtime. Project-private libarchive override at xmake/packages/libarchive.lua swaps the upstream lzma (7-Zip LZMA SDK) dep for xz (liblzma). Verified via nm. Affected xpkgs in xim-pkgindex: node@* linux, llvm macosx-arm64.

Migration

0.4.9 → 0.4.10 is binary-compatible; self-replace path handles the upgrade. The new build_deps schema is opt-in (legacy array form keeps working).

Test plan

Release flow reminder

.github/workflows/release.yml is workflow_dispatch only — manually triggered via GH Actions UI or gh workflow run release.yml -f version=0.4.10 after this PR merges to main. No tag push required; the workflow tags + cuts the GitHub Release itself.

…split + .tar.xz fix

Bumps VERSION from 0.4.9 to 0.4.10. Highlights since 0.4.9:

  * #250 — `xlings remove xim:xlings` no longer silently terminates on
    Windows when xlings has only one version installed. Three layered
    fixes: (1) installer.cppm switches both `remove_shim_if_present`
    call sites to the error_code overload + log::warn (was throwing
    filesystem_error from ERROR_SHARING_VIOLATION when DeleteFile hit
    the running xlings.exe shim, escaping cli::run with no top-level
    catch → std::terminate, silent CI fail). (2) cmd_remove detects
    "target is xlings + only one version installed" upfront and
    refuses with rc=2 + redirect to `xlings self uninstall`.
    (3) cli::run wraps app.run in a top-level catch for
    filesystem_error / std::exception / ... so any future stray throw
    surfaces as a logged error + non-zero rc.

    Bonus while threading rc properly: cmdline lib stores actions as
    std::function<void(...)>, so action lambda's int returns were
    being silently discarded by every cmd_*. Captured via a wrap_rc
    helper so `xlings install <bad-pkg>` etc actually return non-zero
    to scripts now.

  * #249 — Build vs runtime deps schema split (xpkg/libxpkg side at
    mcpplibs-xpkg 0.0.32). Packages can now declare:
      `xpm.<platform>.deps = { runtime = {...}, build = {...} }`
    Runtime deps activate in the workspace as before; build deps
    land in xpkgs but are NOT activated — the consumer's install
    hook accesses them via `pkginfo.build_dep("name")` (Lua) or via
    injected env `XLINGS_BUILDDEP_<UPPER>_PATH` + bin on PATH for the
    hook subprocess. Legacy `deps = { ... }` array form is preserved
    via loader fan-out (populates both kinds identically). Resolver
    DFS propagates DepKind through the dep graph; installer skips
    `run_config_hook_` for kind=Build so build deps don't pollute the
    user's PATH or version DB. `xlings info` shows runtime/build deps
    separately when the new form is used.

  * #251 — `.tar.xz` / `.tar.lzma` extraction now uses internal
    liblzma instead of fork-exec'ing the system `xz` binary at
    runtime. xmake-repo's libarchive package def lists
    `add_deps("zlib", "bzip2", "lz4", "zstd", "lzma")`, but xrepo's
    `lzma` is the 7-Zip LZMA SDK (LzmaLib.h, LzmaCompress) while
    libarchive's CMakeLists actually probes for xz-utils' liblzma
    (lzma.h, lzma_code) — the right xrepo package is `xz`. Result on
    main: cmake find_package(LibLZMA) silently failed → libarchive
    fell back to `archive_read_support_filter_xz_external` →
    fork-exec'd `xz` at runtime → silent failure on musl-static
    minimal containers and Windows (no xz binary on PATH). Concrete
    affected xpkgs: node@* (linux .tar.xz), llvm (macosx-arm64
    .tar.xz). Project-private libarchive override in
    `xmake/packages/libarchive.lua` (set_base("libarchive") + swap
    deps lzma → xz + force -DENABLE_LZMA=ON). Verified via `nm`:
    libarchive-xlings.a now has `U lzma_code / lzma_alone_decoder /
    lzma_crc32 / lzma_end / lzma_properties_decode`; no more "Using
    external xz program" string in the .a.

Migration: 0.4.9 → 0.4.10 is binary-compatible; xlings's own
self-replace path handles the upgrade. The new build_deps schema is
opt-in (legacy array form keeps working).

Drop-the-override criterion (for #251): when xmake-repo merges a
fix changing libarchive's `add_deps("lzma")` → `add_deps("xz")`,
`xmake/packages/libarchive.lua` can be deleted and the root xmake.lua
reverted to `add_requires("libarchive 3.8.7")` + `add_packages("libarchive")`.
@Sunrisepeak Sunrisepeak merged commit 91e5de3 into main May 1, 2026
3 checks passed
@Sunrisepeak Sunrisepeak deleted the release/0.4.10 branch May 1, 2026 14:57
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