-
Notifications
You must be signed in to change notification settings - Fork 380
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
bazel visibility extension should allow override default_visibility #1467
Comments
Yup you're right. I accumulated visibilities here with the idea that it would allow someone to define multiple back to back directives, but I did not consider the case that it is even appending directive values it finds in other files. Maybe it is better to only accumulate within the same file (i.e. same call to |
Yeah, I think it's better to treat a subpackage's If a change were made to parent scope visibility, the change's author should be responsible to replicate such changes to children's packages that have overridden parents' visibility. That way, such change would impact code ownership and trigger various code review systems. So it's gonna be a +1 for me to get rid of the accumulation. Side note: Imo this behavior is relatively safe to change. Although the language plugin was part of the last release and we recently added documentation for the new directive, the language is not yet included as part of |
…b#1467) Previously the logic of this extension accumulated default visibilities to the list across all configurations without any reset. As noted in the attached issue, this is unintuitive and did not add real value so long as multiple directives within the same file can still aggregate values.
Previously the logic of this extension accumulated default visibilities to the list across all configurations without any reset. As noted in the attached issue, this is unintuitive and did not add real value so long as multiple directives within the same file can still aggregate values.
Fix all the visibility scope issues that was reported in bazel-contrib/bazel-gazelle#1467
Fix all the visibility scope issues that was reported in bazel-contrib/bazel-gazelle#1467
Fix all the visibility scope issues that was reported in bazel-contrib/bazel-gazelle#1467
Fix all the visibility scope issues that was reported in bazel-contrib/bazel-gazelle#1467
Let's say I have a setup like this
with these file contents
Running gazelle
bazel/visibility
extension would generate something like thiswhile the sensible expected result should be
The text was updated successfully, but these errors were encountered: