You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
Proposed solution
Extend label_keyed_string_dict_type in licenses_core.bzl to also expand the dict keys.
Example:
Specifications
The text was updated successfully, but these errors were encountered: