0

Bazel uses the concept of visibility to limit which targets can depend on which targets. Given a target //my:foo, I am looking for a way to query Bazel for a list of targets visible to //my:foo.

Basically, I am trying to figure out which targets in the workspace the target //my:foo can depend on. Any idea if this is possible at all?

Gunnar
  • 2,264
  • 17
  • 31

1 Answers1

2

Query has a visible function. So, bazel query 'visible(//my:foo, //...)' prints all the targets that //my:foo may depend on.

Benjamin Peterson
  • 19,297
  • 6
  • 32
  • 39