-
Notifications
You must be signed in to change notification settings - Fork 178
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
Nesting of pkg_filegroup
is not possible
#415
Comments
Thanks for asking.
I thought about doing this in the original
Yeah, you do need to be careful with I'm not opposed to implementing this in the long-term, and would be willing to look at patches to add such support. |
To add to Andrew's point about "too much complexity ... without immediate
use".
Please feel free to show a good example of what you want to accomplish with
a syntax that is intuitive and not to bulky.
We are driving a lot of design from actual use cases and a "why this
feature is important" is super helpful.
…On Thu, Aug 19, 2021 at 1:56 PM Andrew Psaltis ***@***.***> wrote:
Thanks for asking.
Is there any specific reason that this is not allowed?
I thought about doing this in the original pkg_filegroup design, but in
discussions with @aiuto <https://github.com/aiuto>, we concluded that
doing so would add too much complexity for a feature without immediate use.
That aside, it should be doable.
Using pkg_files everywhere (except at the top-level) is legal starlark,
but needs very careful strip_prefix handling to not have too many/the
wrong prefixes (or I don't understand strip_prefix well enough).
Yeah, you do need to be careful with strip_prefix, and the behavior can
be confusing or surprising at times. We're looking into making it more
intuitive in #354 <#354>.
I'm not opposed to implementing this in the long-term, and would be
willing to look at patches to add such support.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#415 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHHHDYLWHWGIYSBBFZQLLT5VAVFANCNFSM5COOFVKQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Okay, let me explain better what I want to achieve, with hopefully not too many internal terms. I am building a prototype how to package what we call a CodeQL distribution (a zip file containing our software).
Each language pack again can contain an arch-specific part and a generic part. It makes sense for us to package up these language packs into zip files independent from the distribution, but also re-use the same
These filegroups can then serve as input to a bunch of In the future, I'd also like to generate a Syntax-wise, I think you're there already, if I could use a |
Thanks for the description. The idea makes sense, it's just a matter of implementing it. We actually found a internal use case for this functionality, and a colleague of mine has an implementation available. A PR for it should be available soon. |
This commit enables users to feed a `pkg_filegroup` into another `pkg_filegroup`. Starlark tests included. Resolves #415. Testing Done: - `bazelisk test tests/mappings/...`
I am using
pkg_filegroup
on sources that are apkg_filegroup
again.This fails with
Is there any specific reason that this is not allowed?
Using
pkg_files
everywhere (except at the top-level) is legal starlark, but needs very carefulstrip_prefix
handling to not have too many/the wrong prefixes (or I don't understandstrip_prefix
well enough).The text was updated successfully, but these errors were encountered: