xla icon indicating copy to clipboard operation
xla copied to clipboard

Enable bazel builds without --nocheck_visibility

Open hawkinsp opened this issue 2 years ago • 4 comments

Currently bazel builds of XLA from the OpenXLA repository require disabling visibility checks via the --nocheck_visibility argument to Bazel. It would be great if we could fix this!

hawkinsp avatar Feb 15 '23 16:02 hawkinsp

I think the fundamental issue here is that visibility is almost useless outside of a monorepo. We also have to build our integration with TF with --nocheck_visibility (related, https://github.com/bazelbuild/bazel/issues/16767)

GMNGeoffrey avatar Feb 15 '23 18:02 GMNGeoffrey

I think it's still useful to have visibility within each repository, e.g., for internal structuring purposes. The key is that we should open visibility to any public targets that cross repository boundaries.

hawkinsp avatar Feb 15 '23 18:02 hawkinsp

Right, it's nice intra-project but totally breaks across projects. Which is fine in google3 because it's all one "project". I think the concept of visibility groups is useful, but the implementation is totally not set up for a moderately complex constellation of projects

GMNGeoffrey avatar Feb 15 '23 22:02 GMNGeoffrey

Any updates? It's unfortunate to break visibility for all the downstream users and their own internals.

hawkinsp avatar Mar 13 '23 18:03 hawkinsp

As of, https://github.com/openxla/xla/commit/ccceb5fefba9d946512c7a2041bbcc78d252364a, this is resolved.

tpopp avatar Apr 12 '23 12:04 tpopp