rules_license
rules_license copied to clipboard
Create ADD_PKG_MGR.md
Allows package manager implementations like rules_jvm_external to begin declaring the licenses or other metadata about third-party packages they fetch and add to the dependency graph.
Needs some discussion with @mzeren-vmw about whether this is the shape we want to commit to, vs. having a package_info
rule as well.
See also: https://github.com/bazelbuild/bazel/issues/22403, which asks for a way of attaching license info to a specific target (which we will need for rules_jvm_external
)
See also: bazelbuild/bazel#22403, which asks for a way of attaching license info to a specific target (which we will need for
rules_jvm_external
)
Does rules_jvm_external
combine multiple distinct modules into a single BULD file?
We can declare multiple java_export
targets, each with potentially different licenses and PackageInfo
, in a single build file.
Having now implemented this for rules_jvm_external
in https://github.com/bazelbuild/rules_jvm_external/pull/1232, I think that this PR needs to highlight some changes.
- Rules controlled by a ruleset can (and likely should) return a
PackageInfo
directly. Other mechanisms are unnecessary indirection, and this also allows user configured rules (java_export
in the case ofrules_jvm_external
) to also participate in providing information. - Attaching a custom
PackageInfo
via thepackage_info
rule also works, but can create a proliferation of additional targets, just to create thePackageInfo
provider. - In many cases, a global license info or
PackageInfo
is not going to be very useful, since third party deps likely have many different licenses.