4 ms·
This is one part of a _very_ big answer, but Bazel (internally Blaze) lets you do reverse dependency querying [0] with the query language, i.e. "Bazel, give me
by jingwen 9y ago
This is one part of a _very_ big answer, but Bazel (internally Blaze) lets you do reverse dependency querying [0] with the query language, i.e. "Bazel, give me the list of targets that depend on this target that I've just modified"
$ bazel query 'rdeps(//foo/my:target, //...)'
Of course, this query in the monorepo will take a long time or not work, because the target universe of "//..." is far too large. This is where other systems come in.
[0] https://docs.bazel.build/versions/master/query.html#rdeps https://docs.bazel.build/versions/master/query.html#rdeps
- wocram 9y agoI imagine this is yet another thing that can be cached, but you can expand on 'other systems'?
- jingwen 9y agoI'm unsure about the confidentiality of those systems, so I'm erring on the side of not expanding. However by deriving from first principles, yes, there is no reason to re-query the transitive closure of unchanged targets' reverse deps, so caching can happen here.