[rust] xz uncompressor for Firefox Linux nightlies#14832
[rust] xz uncompressor for Firefox Linux nightlies#14832bonigarcia merged 2 commits intoSeleniumHQ:trunkfrom bgermann:xz
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
@VietND96 Are the two failing checks caused by the new crate dependency? Am I required to change anything? |
|
Looks like you missed to format code. Run |
The xz2 crate is already in the dependency tree, so use it for implementing a xz uncompressor.
|
I have run the test and included the Bazel lock file change. |
|
Ah, and the import sorting is now fixed as well. |
bonigarcia
left a comment
There was a problem hiding this comment.
@bgermann: Thanks a lot for reporting and contributing. I tested your code, and it works nicely. My only concern is that the new function uncompress_xz is almost identical to the existing uncompress_bz2, so it would be better to create a common function for both parameterizing the decoder (XzDecoder and BzDecoder respectively). Can you please make that change in your PR?
Refactor the BZ uncompressor to be a generic tar uncompressor. Implement a new XZ uncompressor based on it so selenium-manager can deal with the new Firefox nightly builds for Linux.
|
Looks good to me, many thanks, @bgermann. I tested locally it and it works nicely. Some tests are failing in CI but the reason is other, so it can be merged. Thanks again! |
User description
Description
Add a xz uncompressor.
Motivation and Context
Mozilla provides Linux nightlies in tar.xz archived now. Closes: #14831
Types of changes
Checklist
PR Type
Enhancement
Description
xz2crate.uncompress_xzto handle the extraction of XZ compressed files.uncompressfunction to include logic for handling XZ file extensions.xz2crate to the project's dependencies inCargo.toml.Changes walkthrough 📝
files.rs
Add XZ file decompression support in Rustrust/src/files.rs
xz2dependency for XZ file decompression.uncompress_xzfunction to handle XZ file extraction.uncompressfunction to support XZ file format.Cargo.toml
Add xz2 crate dependency for XZ supportrust/Cargo.toml
xz2crate to dependencies for XZ decompression.