[rust] Use apple-flat-package crate to extract PKG files#13740
Conversation
|
PR Description updated to latest commit (683967b)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
CI Failure Feedback(Checks updated until commit 6e00341)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR: where Configuration options
See more information about the |
|
Does the SM binary grow? |
|
This PR fixes the Rust build. In addition to uses the previously described crate to extract PKG files, this PR bumps the version of the rules_rust. We were using a very old version, and that was causing several issues. Now everything seems to work nicely.
Not really. You can see the size of the resulting binaries at the bottom of the workflow run: https://github.com/SeleniumHQ/selenium/actions/runs/8442841426 I don't see differences with respect to the current stable binaries: https://github.com/SeleniumHQ/selenium/blob/trunk/common/selenium_manager.bzl |
|
Nice, I will merge after CI passes again. |
User description
Description
This PR uses an existing crate called apple-flat-package to uncompress PKG artifacts, required to manage Firefox and Edge in macOS.
Motivation and Context
Previously, SM used the shell command
pkgutilto this aim. Nevertheless, this extraction is not working properly in GHA (although in local machines seems to continue working).Types of changes
Checklist
Type
bug_fix, enhancement
Description
apple_flat_packagecrate for uncompressing PKG files, enhancing reliability and portability.apple-flat-packageto dependencies for handling PKG file extraction.Changes walkthrough
files.rs
Replace Shell Command with Crate for PKG Uncompressionrust/src/files.rs
apple_flat_packagecrate usage.
major_browser_versionparameter fromuncompress_pkgfunction.
PkgReaderfromapple_flat_package.lib.rs
Cleanup and Simplification after PKG Uncompression Updaterust/src/lib.rs
uncompressfunction calls by removing themajor_browser_versionparameter.Cargo.toml
Add Dependency for PKG File Handlingrust/Cargo.toml
apple-flat-packagecrate to dependencies.