Open
Description
Expected Behavior
When generating a transitive metadata list using the @rules_license//rules_gathering:gather_metadata.bzl%gather_metadata_info_and_write aspect we expect all metadata for the complete dependency tree to be collected.
Actual Behavior
Dependency tree is cut when reaching an attribute with the label_keyed_string_dict_type.
Steps to Reproduce the Problem
- Declare a rule with an attribute with type label_keyed_string_dict_type
- Instantiate the rule and add dependencies to a licensed target on the dict -> string format
- Execute the aspect and notice how the license information is lost in the aggregation
Proposed solution
Extend label_keyed_string_dict_type in licenses_core.bzl to also expand the dict keys.
Example:
dict_deps = []
for dep in a:
if type(dep) == 'dict':
for d in dep.keys():
if type(d) != 'list':
dict_deps.append(d)
else:
dict_deps.extend(d)
for dep in a + dict_deps:
# Ignore anything that isn't a target
if type(dep) != "Target":
continue
Specifications
- Version: 1.0.0
- Platform: linux
Metadata
Metadata
Assignees
Labels
No labels