Repository navigation
Conversation
Collaborator
Author
|
This PR was prepared by an agent under human direction. Review comments are triaged by the human author; agent-drafted replies and changes are reviewed and approved by the author before posting. This is an agent-generated comment unreviewed by the user. |
Extracting wheel files for `whl_filegroup` currently runs a Python process per target to parse `RECORD` and unpack matching entries. Add `//crates/extract_wheel_files:extract_wheel_files_lib` using `zip`, `csv`, and `regex`, register `extract_wheel_files` on `shrubbery`, and route `PyExtractWheelFiles` through `get_shrubbery_tool`.
rickeylev
force-pushed
the
rickeylev/shrubbery/03-extract-wheel-files
branch
from
November 16, 2026 05:23
335563e to
0057268
Compare
rickeylev
commented
Nov 17, 2026
| { | ||
| fs::create_dir_all(outdir).with_context(|| format!("creating {}", outdir.display()))?; | ||
|
|
||
| let mut archive = open_wheel_archive(whl_path)?; |
Collaborator
Author
There was a problem hiding this comment.
The wheel is opened twice. Can we open it once instead?
|
|
||
| /// Result of parsing the command line. | ||
| #[derive(Debug, Clone)] | ||
| pub enum Cli { |
Collaborator
Author
There was a problem hiding this comment.
rename to ParsedArgs, like in pr 4511
| // The length check above guarantees the first two positionals exist. | ||
| let whl_path = PathBuf::from(positional.remove(0)); | ||
| let outdir = PathBuf::from(positional.remove(0)); | ||
| let regex_pattern = match positional.pop() { |
Collaborator
Author
There was a problem hiding this comment.
This looks like a match being used as an if-else. Is this idiomatic in rust?
…eylev/shrubbery/03-extract-wheel-files
…tions Use `if let Some(raw) = positional.pop()` for the optional regex argument, rename `Cli::Run` to `ParsedArgs::Options`, unwrap `tool.executable[DefaultInfo].files_to_run` in `whl_filegroup.bzl`, and add `# Errors` and relative-path rustdocs.
This branch has not been deployed
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.
Extracting wheel files for
whl_filegroupcurrently runs a Pythonprocess per target to parse
RECORDand unpack matching entries.Add
//crates/extract_wheel_files:extract_wheel_files_libusingzip,csv, andregex, registerextract_wheel_filesonshrubbery, androute
PyExtractWheelFilesthroughget_shrubbery_tool.Work towards #4250