Skip to content

Allow $python_root$ in the # gazelle:python_visibility directive #1932

@dougthor42

Description

@dougthor42

🚀 feature request

Relevant Rules

  • gazelle

Description

#1784 added the python_visibility directive. #1787 added the python_default_visibility directive, which includes support for injecting the python root via $python_root$ (technically it was #1835 that added the trailing $).

However, python_visibility doesn't support $python_root$, so you end up with cases where sometimes you get to use $python_root$ and other times you have to hard-code it:

# gazelle:python_default_visibility //$python_root$/foo/bar/baz:__subpackages__, //$python_root$/somewhere
# gazelle:python_visibility //src/foo/bar:__pkg__

Describe the solution you'd like

Add support for $python_root$ to gazelle:python_visibility.

Describe alternatives you've considered

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions