bootstrap xz extractor#87
Merged
Merged
Conversation
loads our (known-good) .gz bottled `xz` to do extraction on systems that don't ship it.
Coverage Report for CI Build 28962413987Coverage decreased (-0.08%) to 82.496%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR adds an xz bootstrap path so bottle extraction can succeed on systems that don’t ship xz/liblzma, by installing a known-good xz from a .tar.gz bottle and using it during tar extraction.
Changes:
- Add
xzbootstrap logic toinstall()so.tar.xzbottles can be extracted even when systemxzis unavailable. - Add an integration-style test covering the “no system xz” scenario.
- Add a dedicated CI job that runs the new test in a minimal Debian container without
xz.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/plumbing/install.ts | Introduces bootstrap package selection + per-extractor environment setup to ensure tar can extract .xz bottles. |
| src/plumbing/install.no-system-xz.test.ts | Adds a targeted test validating that xz is bootstrapped when missing from the base system. |
| .github/workflows/ci.yml | Adds a containerized CI job to exercise the “no system xz” extraction path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+166
to
+170
| const xz = await install(XZ_BOOTSTRAP, opts.logger) | ||
| env.PATH = `${xz.path.join("bin")}:${SYSTEM_PATH}` | ||
| if (Deno.build.os == 'linux') { | ||
| env.LD_LIBRARY_PATH = xz.path.join("lib").string | ||
| } |
Comment on lines
+87
to
+94
| - run: | | ||
| if command -v xz; then | ||
| echo "unexpected system xz" >&2 | ||
| exit 1 | ||
| fi | ||
| curl -fsSL https://deno.land/install.sh | sh | ||
| echo "$HOME/.deno/bin" >> "$GITHUB_PATH" | ||
| - run: PKGX_TEST_NO_SYSTEM_XZ=1 deno test --no-check --unstable-fs --unstable-ffi --allow-all src/plumbing/install.no-system-xz.test.ts |
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.
loads our (known-good) .gz bottled
xzto do extraction on systems that don't ship it.