bazelbuild / rules_license

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rules should be able to customize how licenses propagate through them.

adam-azarchs opened this issue · comments

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.