Skip to content

bootstrap xz extractor#87

Merged
jhheider merged 1 commit into
mainfrom
bootstrap-xz
Jul 8, 2026
Merged

bootstrap xz extractor#87
jhheider merged 1 commit into
mainfrom
bootstrap-xz

Conversation

@jhheider

@jhheider jhheider commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

loads our (known-good) .gz bottled xz to do extraction on systems that don't ship it.

loads our (known-good) .gz bottled `xz` to do extraction on systems that don't ship it.
Copilot AI review requested due to automatic review settings July 8, 2026 17:26
@jhheider jhheider merged commit d16af35 into main Jul 8, 2026
10 checks passed
@jhheider jhheider deleted the bootstrap-xz branch July 8, 2026 17:27
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 28962413987

Coverage decreased (-0.08%) to 82.496%

Details

  • Coverage decreased (-0.08%) from the base build.
  • Patch coverage: 6 uncovered changes across 1 file (27 of 33 lines covered, 81.82%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
src/plumbing/install.ts 33 27 81.82%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3001
Covered Lines: 2532
Line Coverage: 84.37%
Relevant Branches: 781
Covered Branches: 588
Branch Coverage: 75.29%
Branches in Coverage %: Yes
Coverage Strength: 3161.52 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 xz bootstrap logic to install() so .tar.xz bottles can be extracted even when system xz is 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 thread src/plumbing/install.ts
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 thread .github/workflows/ci.yml
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
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.

3 participants