<#20733 Visibility rules doesn't support dict form...
# github-notifications
c
#20733 Visibility rules doesn't support dict formated rules Issue created by isra17 Is your feature request related to a problem? Please describe. The current visibility rules are splitted into
selectors
or
visibility rules
. As documented, selector can either be string glob or dictionnary with explicit attribute naming (eg.
{"tags": ["core"]}
or
(core)
). However,
visibility rules
documentation example are only glob strings. It appears that visibility rules also support attributes matching by using the special syntax
<type>[path](tag)
. Looking at the code, they actually share the same matching logic for parsing and comparaison. However the
__dependencies_rule__
function define
visibility rules
as
str
, therefor passing attribute dictionnary (
{"tags": ["core"]}
) is not supported. Is there any reason for this limitation? Describe the solution you'd like It seems to me that we could just accept
dict
for visibility rules and everything should work as expected. pantsbuild/pants