-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@bazel_tools//tools/zip:zipper: allow glob exclusion to prevent files from being extracted from a zip file #23662
Comments
AIUI |
TL;DR we want to be able to extract (a subset of) files from a zip archive in a way that is consumable by other actions (mostly I asked here what is the most proper way to hermetically unzip things; the answer was to use zipper . The use case is described in the first link. We have a custom rule which is a wrapper around a non-hermetic If |
https://registry.bazel.build/modules/ape has cross-platform binaries for common utilities, including |
Thanks @fmeum ! Learn about a new module every day :) I am happy to use a new module, but would prefer to lean on a built-in if possible. If |
@lberki @meteorcloudy Do we have a stance on expanding the scope of |
@tjgq @bendavini @ahumesky I'd much, much rather no one use that built-in zipper tool. It was added in support of Android rules, which are in the process of being removed from the Bazel proper and thus ideally, this binary would also vanish from |
Description of the feature request:
unzip
(https://infozip.sourceforge.net/) allows users to specify files to exclude while unzipping a file:unzip file.zip -x $(<excl_file.txt)
In order to use
zipper x
in a similar way, a user needs to perform some additional shell magic to get the same result (we've a full (currently non-hermetic)unzip.bzl
that uses system unzip to achieve this.)Which category does this issue belong to?
CLI, Core
What underlying problem are you trying to solve with this feature?
Make
zipper
's extract (x
) functionally equivalent to the widely-usedunzip
utilityWhich operating system are you running Bazel on?
Mac(x86/aarch64) / Linux (x86)
What is the output of
bazel info release
?7.2.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No. Have scoured slack, github, email threads, and our internal tools
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: