bazelbuild / bazelbuild/bazel

Running rdeps / allrdeps queries without fetching all external dependencies

Open
#13,190 27 comments 19 reactions 2 assignees Claimed by @meisterT View on GitHub
P2 team-Core team-Performance type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the problem / feature request:

Aloha!

Our team is using `rdeps` / `allrdeps` to query reverse dependencies of targets. For example, this lets us know that for a given change to a local target, what is the set of reverse dependencies we should also build and test in order to validate that change.

We noticed that when running the query like this:

```
bazel query --universe_scope=//local_reverse_dependencies/... --order_output=no "allrdeps(//updated_local_target:name)"
```

-- this command will fetch all external dependencies of `//local_reverse_dependencies/...` -- for example, all `http_file` files, all `rules_jvm_external` artifacts, all `rules_docker` images, etc.

But since any changes to `//updated_local_target:name` would not affect external dependencies, we're not sure why they need to be fetched.

Our ask is simply: **Is there a way to execute this query without requiring all external dependencies of `//local_reverse_dependencies/...` to be fetched?**

Thank you for your help!

### What operating system are you running Bazel on?

macOS Catalina 10.15.4 (19E287)

### What's the output of `bazel info release`?

```
>_ bazel info release
release 3.0.0
```

### Have you found anything relevant by searching the web?

We haven't seen anything else related to this on GitHub issues or elsewhere.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.