rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

fix(gazelle): _actually_ don't write narrow dependencies.

Open aryamccarthy opened this issue 2 years ago • 1 comments

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.

aryamccarthy avatar Jan 11 '24 02:01 aryamccarthy

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.

aryamccarthy avatar Jan 11 '24 02:01 aryamccarthy

Let me know if we can close this since #1784 got merged. i think that should address your use-case.

aignas avatar Mar 01 '24 09:03 aignas