Repository navigation
core: add xscript module - #109
Merged
Merged
Conversation
Sunrisepeak
commented
Aug 14, 2025
Member
- xscript module
- entry point: xpkg_main
- command: xlings script file.lua [option]
- option args: --xscript-info
- fix find_tool issues - workaround/tmp?
- xpkg: fix version ref issues
1. xscript module - entry point: xpkg_main - command: xlings script file.lua [option] - option args: --xscript-info 2. fix find_tool issues - workaround/tmp? 3. xpkg: fix version ref issues Signed-off-by: sunrisepeak <[email protected]>
Member
Author
xpkg/xscript 即是包也是脚本 - 复用机制
基本功能
可能适用场景
测试命令安装脚本 xim --add-xpkg musl-cross-make.lua
xlings install musl-cross-make使用脚本 musl-cross-make切换脚本版本 xlings use musl-cross-make测试脚本xpkg文件 / xscript脚本复用package = {
-- base info
name = "musl-cross-make",
description = "Simple makefile-based build for musl cross compiler",
authors = "Rich Felker, et al.",
contributors = "https://github.com/richfelker/musl-cross-make/graphs/contributors",
licenses = "MIT",
repo = "https://github.com/richfelker/musl-cross-make",
-- xim pkg info
type = "script",
status = "stable",
categories = {"linux", "build-helper", "toolchain"},
keywords = {"linux", "musl", "libc", "toolchain", "compiler", "makefile", "gcc"},
-- xvm: xlings version management
xvm_enable = true,
xpm = {
linux = {
["latest"] = { ref = "0.0.1" },
["0.0.1"] = { },
},
},
}
import("xim.libxpkg.xvm")
-- function main() inherits failed for package?
-- avoid to call main when import this package?
function xpkg_main(...)
print("hello world - 0.0.4")
--print(xvm.info("musl-cross-make", "0.0.1"))
end |
Sunrisepeak
added a commit
that referenced
this pull request
May 2, 2026
CI 4th attempt with main HEAD (3f1462d) failed: post-#108 pkgindex schema needs hooks that v0.4.13 doesn't yet wire up: - gcc-specs-config (added in #109) doesn't auto-activate; gcc's config hook fails 'no version set for gcc-specs-config' - node has runtime dep on xim:gcc but its rpath closure misses gcc's libstdc++ subdir → libstdc++.so.6 not found These need fixes in either xlings (resolver/config hook ordering) or xim-pkgindex (gcc-specs-config registration / lib paths) — both out of scope for this CI bump. Pin XIM_PKGINDEX_REF back to 83044b5 (verified known-good for v0.4.13 during PR #257 release CI). Future bump: in lockstep with the next xlings release that supports post-#108 schema.
Sunrisepeak
added a commit
that referenced
this pull request
May 2, 2026
* ci: bump bootstrap xlings v0.4.8 → v0.4.13 + xim-pkgindex pin Co-bump BOOTSTRAP_XLINGS_VERSION and XIM_PKGINDEX_REF across all four workflows that clone the fixture (xlings-ci-linux, xlings-ci-macos, xlings-ci-windows, release). BOOTSTRAP_XLINGS_VERSION: v0.4.8 → v0.4.13 XIM_PKGINDEX_REF: 83044b5 (pre-#108) → 3f1462d (xim-pkgindex main tip as of v0.4.13) Why co-bump: the bootstrap xlings's resolver / elfpatch / catalog behavior must match the pkgindex schema (legacy deps array vs new runtime/build split, namespace conventions, exports.runtime.loader, etc.). Bumping one without the other risks an in-flight pkgindex breaking a stable bootstrap or vice versa — exactly what happened during the 0.4.13 hotfix sequence (xim-pkgindex#108 added bare-name deps that 0.4.8's resolver couldn't disambiguate, cascading through E2E-05 dual-mount). v0.4.13 contains the elfpatch op-order fix (libxpkg PR #13 / v0.0.37) and pairs with xim-pkgindex 3f1462d (PRs #110/#111 namespace fixes applied). Both refs verified together via PR #257's CI. The earlier fixture-pin comment is reframed: it's not a one-off workaround but a permanent bump-in-lockstep policy. * ci: revert XIM_PKGINDEX_REF to 83044b5 (last known-good vs v0.4.13) CI 4th attempt with main HEAD (3f1462d) failed: post-#108 pkgindex schema needs hooks that v0.4.13 doesn't yet wire up: - gcc-specs-config (added in #109) doesn't auto-activate; gcc's config hook fails 'no version set for gcc-specs-config' - node has runtime dep on xim:gcc but its rpath closure misses gcc's libstdc++ subdir → libstdc++.so.6 not found These need fixes in either xlings (resolver/config hook ordering) or xim-pkgindex (gcc-specs-config registration / lib paths) — both out of scope for this CI bump. Pin XIM_PKGINDEX_REF back to 83044b5 (verified known-good for v0.4.13 during PR #257 release CI). Future bump: in lockstep with the next xlings release that supports post-#108 schema.
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.