Move upstream xz to vendor directory - #11
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (33)
WalkthroughThis PR restructures the xz-rs repository by publishing the ChangesDependency Migration and Submodule Relocation
Systest Backend Consolidation
Performance Infrastructure Updates
Tests and Documentation Updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
69-73:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winClarify README backend options:
liblzma-sysis still supported
xzstill defines an optionalliblzma-sysfeature (wired to theliblzma-sysdependency), so the README snippet at lines 69-73 is still valid.
The backend description (lines 63-68) lists onlyxz-coreandxz-sys; update it to explicitly mention thatfeatures = ["liblzma-sys"]switches to the external Cliblzma-sysimplementation (and how that differs from thexz-sysbackend).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` around lines 69 - 73, Update the README backend description to explicitly mention the optional feature "liblzma-sys" on the xz crate and explain how to enable it (features = ["liblzma-sys"]) to switch from the Rust-based xz-core/xz-sys backends to the external C liblzma-sys implementation; describe the practical difference (uses system/liblzma C library vs bundled Rust implementation) and clarify compatibility/behavior differences compared to xz-sys so readers know when to choose the C backend.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/publish.yml:
- Line 17: The publish workflow condition is too permissive; update the if
condition that references github.ref so it only triggers for tags explicitly
targeting the xz crate (e.g., tags beginning with "xz-") while still excluding
xz-sys tags. Locate the conditional line that currently uses
startsWith(github.ref, 'refs/tags/xz') and replace it with a more specific check
using startsWith(github.ref, 'refs/tags/xz-') combined with the existing
not-startsWith exclusion for 'refs/tags/xz-sys' so only tags like "xz-..." (not
generic tags like "v1.0.0") trigger the publish. Ensure the final expression
keeps github.ref as the referenced symbol and preserves the negation for
'xz-sys'.
In `@Cargo.toml`:
- Line 25: The liblzma-sys dependency is declared without disabling its defaults
so its default = ["bindgen"] will be pulled in whenever the xz backend is
enabled; update the Cargo.toml entry for liblzma-sys to opt out of default
features (add default-features = false) if you want bindgen to be opt-in, or
alternatively remove/adjust the xz crate's passthrough feature (bindgen =
["liblzma-sys?/bindgen"]) so it no longer implicitly enables liblzma-sys's
bindgen; target the liblzma-sys dependency declaration and the xz crate feature
named bindgen when making the change.
In `@tests/sys_equivalence.rs`:
- Around line 127-147: The test xz_sys_keeps_liblzma_sys_compatible_features
currently hardcodes an expected BTreeMap built from
include_str!("../xz-sys/Cargo.toml") which makes it brittle; change the test to
either (preferred) parse liblzma-sys's Cargo.toml at a known version (or the
published crate manifest) and compare the parsed feature maps from
parse_feature_table for both crates instead of asserting against the literal
`expected` BTreeMap, or (if you want minimal change) add a clear comment above
the `expected` BTreeMap explaining it must be kept in sync with liblzma-sys
0.4.6 and why; locate and update the test function
xz_sys_keeps_liblzma_sys_compatible_features and the use of
parse_feature_table/include_str!("../xz-sys/Cargo.toml") to implement the
dynamic comparison or the explanatory comment.
---
Outside diff comments:
In `@README.md`:
- Around line 69-73: Update the README backend description to explicitly mention
the optional feature "liblzma-sys" on the xz crate and explain how to enable it
(features = ["liblzma-sys"]) to switch from the Rust-based xz-core/xz-sys
backends to the external C liblzma-sys implementation; describe the practical
difference (uses system/liblzma C library vs bundled Rust implementation) and
clarify compatibility/behavior differences compared to xz-sys so readers know
when to choose the C backend.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6164ff71-67aa-47e8-8295-493435e4f5da
📒 Files selected for processing (33)
.github/dependabot.yml.github/scripts/update-xz.sh.github/workflows/main.yml.github/workflows/publish.yml.gitmodulesCargo.lock.msrvCargo.tomlREADME.mddocs/performance-workflow.mdexamples/standard_files_probe.rsliblzma-sys/Cargo.tomlliblzma-sys/LICENSE-APACHEliblzma-sys/LICENSE-MITliblzma-sys/README.mdliblzma-sys/build.rsliblzma-sys/config.hliblzma-sys/src/bindgen.rsliblzma-sys/src/bindgen_wrap.rsliblzma-sys/src/lib.rsliblzma-sys/src/manual.rsliblzma-sys/src/wasm_shim.rsliblzma-sys/wasm-shim/assert.hliblzma-sys/wasm-shim/stdlib.hliblzma-sys/wasm-shim/string.hperf-probe/Cargo.tomlscripts/compare_all_trimmed.shscripts/compare_backends.shscripts/run_xz_c_tests_with_xz_sys.shsystest/Cargo.tomlsystest/build.rssystest/src/main.rstests/sys_equivalence.rsvendor/xz
💤 Files with no reviewable changes (19)
- liblzma-sys/README.md
- scripts/compare_backends.sh
- .github/dependabot.yml
- liblzma-sys/build.rs
- liblzma-sys/wasm-shim/assert.h
- liblzma-sys/wasm-shim/string.h
- liblzma-sys/LICENSE-APACHE
- liblzma-sys/wasm-shim/stdlib.h
- liblzma-sys/src/bindgen.rs
- liblzma-sys/LICENSE-MIT
- liblzma-sys/config.h
- liblzma-sys/src/wasm_shim.rs
- liblzma-sys/src/bindgen_wrap.rs
- liblzma-sys/src/lib.rs
- systest/Cargo.toml
- liblzma-sys/src/manual.rs
- scripts/compare_all_trimmed.sh
- .github/workflows/main.yml
- liblzma-sys/Cargo.toml
Summary by CodeRabbit
liblzma-syscrate and adopting the published version from crates.io.