-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
It should be possible to attach a rules_license
license to arbitrary targets
#22403
Comments
The presence of |
just chatted to @aiuto -- he said that |
+1. This is a doc bug.
…On Thu, May 16, 2024 at 2:13 PM Xùdōng Yáng ***@***.***> wrote:
The presence of default_package_metadata in the package rule implies that
there's a package_metadata attribute on rules. This doesn't appear to be
the case with Bazel 7.1.0
just chatted to @aiuto <https://github.com/aiuto> -- he said that
package_metadata is an implicit attribute on all rules. Probably
undocumented though. Have you tried it?
—
Reply to this email directly, view it on GitHub
<#22403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHHHHUVZ62OSA3DUXTSALZCTZNPAVCNFSM6AAAAABH2HPCOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVHEYDEMRZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This attribute doesn't seem to be present in Bazel 7.1.1 |
@aiuto It's not too late to cherry-pick this into 7.2.0. |
Huh? It should have been available months ago.
I'm OOO Friday (taking a bona-fide fun for me day), but I can try to find the history next week.
If `package_metadata` is not on all rules, then `applicable_licenses` should be in all Bazel 7.x. The two are synonyms.
|
|
I sent #22497 to encode the intended behavior in a test. Bazel 7 sets the |
Feel free to cherry pick this to 7.x, I'm going to close this one since it seems to be fixed at HEAD. |
Description of the feature request:
Using
package(default_package_metadata = [])
it's possible to attach license information to every target in a build file, but in some cases it would be useful to add a specific license (or metadata) to a specific rule. Thelicenses
attribute was previously used for this, but is now deprecated and only took a stringWhich category does this issue belong to?
Core, External Dependency
What underlying problem are you trying to solve with this feature?
rules_jvm_external
generates a single build file containing every third party dependency that a user can depend on. In order to integrate nicely withrules_license
, it would be useful to be able to assign a specific license to each target, since each dependency may have its own license.Which operating system are you running Bazel on?
n/a
What is the output of
bazel info release
?n/a
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 response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: