release: 0.4.10 — Windows self-uninstall safety + build/runtime deps split + .tar.xz fix#252
Merged
Sunrisepeak merged 1 commit intomainfrom May 1, 2026
Merged
release: 0.4.10 — Windows self-uninstall safety + build/runtime deps split + .tar.xz fix#252Sunrisepeak merged 1 commit intomainfrom
Sunrisepeak merged 1 commit intomainfrom
Conversation
…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")`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps
VERSIONfrom 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
xlings remove xim:xlingsno 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 toself uninstall, top-level catch incli::run. Bonus: action-lambda rc threading viawrap_rchelper so everycmd_*exit code now propagates to the process exit code (was being squashed to 0 by cmdline lib'sstd::function<void(...)>action signature).runtime_depsandbuild_depsin xpkg packages. Build deps land in xpkgs but never activate in the user's workspace — the consumer's install hook reaches them viapkginfo.build_dep("name")or injected env. Legacydeps = { ... }array form preserved via loader fan-out. Carries libxpkg 0.0.32 forward..tar.xz/.tar.lzmaextraction uses internal liblzma instead of fork-exec'ing the systemxzbinary at runtime. Project-private libarchive override atxmake/packages/libarchive.luaswaps the upstreamlzma(7-Zip LZMA SDK) dep forxz(liblzma). Verified vianm. 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
Releaseworkflow via workflow_dispatch (input version=0.4.10) to produce artifactsRelease flow reminder
.github/workflows/release.ymlisworkflow_dispatchonly — manually triggered via GH Actions UI orgh workflow run release.yml -f version=0.4.10after this PR merges to main. No tag push required; the workflow tags + cuts the GitHub Release itself.