bazelbuild / rules_license

Apache License 2.0
80 stars 28 forks source link

Create ADD_PKG_MGR.md #142

Open alexeagle opened 7 months ago

alexeagle commented 7 months ago

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.

shs96c commented 6 months ago

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)

aiuto commented 6 months ago

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?

shs96c commented 4 months ago

We can declare multiple java_export targets, each with potentially different licenses and PackageInfo, in a single build file.

shs96c commented 2 months ago

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.

  1. 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 of rules_jvm_external) to also participate in providing information.
  2. Attaching a custom PackageInfo via the package_info rule also works, but can create a proliferation of additional targets, just to create the PackageInfo provider.
  3. 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.
alexeagle commented 1 month ago

Ping @tonyaiuto this is the thing preventing me from volunteering to update many of the language rulesets