aboutsummaryrefslogtreecommitdiff
path: root/rules/gather_licenses_info.bzl
diff options
context:
space:
mode:
authorTony Aiuto <aiuto@google.com>2022-11-29 17:29:12 -0500
committerTony Aiuto <aiuto@google.com>2022-11-30 00:09:56 -0500
commitefcc6e1a02887389c96b2322a6741677a8c99423 (patch)
treebb52046c2998df563cbb6699eb402de18e49544f /rules/gather_licenses_info.bzl
parentae2f8a528e14bd545ff5835f60592c6e148ef57e (diff)
downloadbazelbuild-rules_license-efcc6e1a02887389c96b2322a6741677a8c99423.tar.gz
Add package_info rule and a new gatherer to manage it.
- Add rules/package_info.bzl - Refactor get_transitive_licenses to get_transitive_metadata. - Take a list of providers to gather. - Some hackery for Bazel 5.x support. This can be fixed if starlark visibility gets backported to Bazel 5. - Add gather_metadata.bzl. This is so we can freely experiment on techniques for multi provider support in OSS land, without impacting existing users in Google. We can merge them some day in the future. - Create a dummy sbom writer. There is also experimental code to show a different design choice for new types of Metadata. I want to preserve both for a while to have a broader design discussion over the next month.
Diffstat (limited to 'rules/gather_licenses_info.bzl')
-rw-r--r--rules/gather_licenses_info.bzl4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/gather_licenses_info.bzl b/rules/gather_licenses_info.bzl
index a5f1a41..b676972 100644
--- a/rules/gather_licenses_info.bzl
+++ b/rules/gather_licenses_info.bzl
@@ -16,7 +16,7 @@
load(
"@rules_license//rules:licenses_core.bzl",
"TraceInfo",
- "gather_licenses_info_common",
+ "gather_metadata_info_common",
"should_traverse",
)
load(
@@ -41,7 +41,7 @@ def _strip_null_repo(label):
return s
def _gather_licenses_info_impl(target, ctx):
- return gather_licenses_info_common(target, ctx, TransitiveLicensesInfo, NAMESPACES, should_traverse)
+ return gather_metadata_info_common(target, ctx, TransitiveLicensesInfo, NAMESPACES, [], should_traverse)
gather_licenses_info = aspect(
doc = """Collects LicenseInfo providers into a single TransitiveLicensesInfo provider.""",