bazelbuild / bazelbuild/rules_license
Rules should be able to customize how licenses propagate through them.
- Dominant language
- Starlark
- Stars
- 85
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
Custom starlark rules should be able to return a `LicensesInfo` provider in the event that they need to customize how licenses propagate. For example, some rules may need to propagate licenses through additional attributes which are unique to that rule. Others may for example want to filter the transitive license set based on the conditions on the license kinds.
## Actual Behavior
`gather_licenses_info` aspect adds a `LicensesInfo` provider unconditionally, which results in an error if the target already has one. It should instead check whether the target already has a `LicensesInfo` provider and return an empty provider list if it does.
Contributor guide
Research direction
Locate the gather_licenses_info aspect and inspect how it adds the LicensesInfo provider; start by tracing provider handling for a target that already supplies one. Done means custom Starlark rules can return their own LicensesInfo without an unconditional-provider error, while normal license propagation still works.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100