fix(gazelle): _actually_ don't write narrow dependencies.
Sorry about #1681 - I had uploaded an older version. This one contains the correct behavior, in line with what I had written.
The goal is to inherit visibility from the BUILD file's default_visibility (or whatever defaults exist higher in the tree).
I'm happy to discuss the issue further at #1682 if you have apprehensions about this change.
Note that every failing test right now is for the same reason. They look like this:
py_binary(
name = "main",
srcs = ["main.py"],
- visibility = ["//:__subpackages__"],
deps = ["@pip//:pandas"],
)
This is because the auto-generated visibility lines aren't produced by this PR. That's the intended behavior, but grep-ing for the test names didn't turn anything up. Otherwise, I'd update the tests myself.
Let me know if we can close this since #1784 got merged. i think that should address your use-case.