Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivating examples for adding this type:
patches
parameters on their module extensions that accept lists of patches to apply per external dependency. With WORKSPACE, they relied onattr.string_list_dict
, but the lack of repo mapping means that there is no direct port. Users would need to migrate to individual tags per hub repo and dep to supply patches.Adding this type doesn't incur a significant maintenance cost:
LABEL_LIST_DICT
already exists (added forexec_group_compatible_with
), so this only requires wiring it up in Starlark. In fact, some of the added logic (duplicate checking) is relevant for this existing use case, we just forgot to add it.attr.string_list_dict
), so there is no need for tooling to explicitly support the new type.Fixes #7989
RELNOTES[NEW]: The new
attr.label_list_dict
type accepts a dict in which keys are strings and values are lists of labels.