-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add attribute strip_prefix to pkg_zip #221
Conversation
It's going to be a few days before I can look at this - I'm behind on lots
of things because of the power outages in the NYC area last week.
My first thought is - can we avoid this and build on the pkg_filegroup work
that @nacl is exploring?
…On Mon, Aug 10, 2020 at 7:12 PM David Schneider ***@***.***> wrote:
@davschne <https://github.com/davschne> requested your review on: #221
<#221> Add attribute
strip_prefix to pkg_zip as a code owner.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#221 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHHHAUSXCVZIZQPQYCMN3SAB5ETANCNFSM4P2N6GQQ>
.
|
No worries, @aiuto. I'm not yet familiar with the Subsequent to posting this PR, I noticed this one that adds several attributes to |
@aiuto, while I'm not sure I fully understand #212 or the motivations for it, my understanding is that it would introduce breaking changes to the APIs of |
Yes. The new idea is a breaking change. But your point about next major version is well taken. |
looks like this landed on |
Bah. Thanks for the catch. I opened a PR (#229) to merge
I can't really speak to releases, but if you want to use the rules at HEAD, you'd need to do something like what's described here: bazelbuild/bazel#10062 (comment) |
I think the CLA bot failure is because you are forwarding (for lack of the
right term) a commit from davschne (
15fb7a0
)
and that is confusing the bot w.r.t. authorship.
@davschne Would you like to try the equivalent? Or do you mind me just
copying out the change and re-applying
to main?
…On Fri, Sep 4, 2020 at 4:12 PM Andrew Psaltis ***@***.***> wrote:
looks like this landed on master instead of main.
Bah. Thanks for the catch.
I opened a PR (#229 <#229>)
to merge master into main to rectify this, but I'm not sure of the best
way to get that past the CLA bot. @aiuto <https://github.com/aiuto>?
Also, will you be planning a release of this anytime soon or if not, how
would I use an unreleased version of these rules?
I can't really speak to releases, but if you want to use the rules at
HEAD, you'd need to do something like what's described here: bazelbuild/bazel#10062
(comment)
<bazelbuild/bazel#10062 (comment)>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#221 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHHHCUBHOZA4LE3T3YOKDSEFCZBANCNFSM4P2N6GQQ>
.
|
Sure, I'll do it. |
* Add attribute strip_prefix to pkg_zip * Add tests for pkg_zip strip_prefix behavior
Resolves #170
I've tried to replicate the behavior of the eponymous attribute in
pkg_tar
, though I find this behavior counterintuitive in some cases. Specifically, see the test packages://tests:test-tar-strip_prefix-empty
//tests:test-tar-strip_prefix-none
My intuition is that the packages built from these targets should contain:
In other words, the default behavior (when
strip_prefix
isn't provided or is empty) should be to create paths in the archive relative to the package of the target.Instead they contain only:
In other words, subdirectories are ignored.
So to clarify, this PR resolves #170 only when the value of
strip_prefix
isn't falsy in Starlark.