Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: auto fix visibility based off the error #3

Closed
mattem opened this issue Jun 14, 2021 · 2 comments
Closed

feature: auto fix visibility based off the error #3

mattem opened this issue Jun 14, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mattem
Copy link
Member

mattem commented Jun 14, 2021

Based off the visibility errors generated by bazel, eg:

ERROR: /blah/BUILD.bazel:0:00: in py_library rule //foo/bar
 target '//baz:baz' is not visible from target '//foo/bar'. Check the visibility declaration of the former target if you think the dependency is legitimate

Suggest auto fixes to the user if they accept that the dependencies are infact, legitimate.

@mattem mattem added the enhancement New feature or request label Jun 14, 2021
@alexeagle
Copy link
Member

Simple method is just add //foo/bar:__pkg__ to the visibility attribute of //baz:baz without taking any care about package_group targets or coalescing into __subpackages__.
Maybe that's fine if we leave a comment on our new entry that it was auto-added from the CLI, then at least it's more clear that it wasn't done by hand and therefore could use some curation.

@f0rmiga
Copy link
Contributor

f0rmiga commented Oct 1, 2021

Done in #34.

@f0rmiga f0rmiga closed this as completed Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants