File
Blob: .opencode/commands/rdeps.md
description: Find what depends on a given external dependency or internal target subtask: true
Find reverse dependencies for: $ARGUMENTS
Use the bazel-deps tool with direction: "rdeps" to perform this lookup. It handles label resolution, Bazel queries, and grouping automatically. Pass the dependency name from the arguments as the target.
The target supports ecosystem qualifiers to disambiguate when a name matches both C++ and Rust targets:
rust:base64orcrate:base64— resolve as a Rust crate onlycpp:base64orcc:base64— resolve as a C++ target only- Unqualified names (e.g.
base64) use the default resolution order (C++ first, then Rust)
Pass the full argument including any qualifier as the target (e.g. target: "rust:base64").
If the argument includes "deep" or "transitive", pass depth: 2 (or higher) to the tool. Otherwise use the default depth of 1 (direct dependents only). Warn the user that deeper queries are slower.
After receiving the tool output, add any useful observations:
- Is the dependency narrowly or broadly used?
- Are there surprising consumers?
- For C++ deps, are source files using the dependency via
deps(public) orimplementation_deps(hidden)? You can check this by reading the relevantBUILD.bazelfiles. - For dependencies that appear unused, note whether they might be pulled in transitively.