bazelbuild / bazelbuild/rules_rust

gen_rust_project triggers download of -everything-

Open
#2,710 1 comment 1 reaction 0 assignees View on GitHub
needs-triage
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

We have a monorepo (yes, thats bazels use-case :P) and have observed that `bazel run @rules_rust//tools/rust_analyzer:gen_rust_project` will run this under the hood: `bazel build --norun_validations --aspects=@@rules_rust~//rust:defs.bzl%rust_analyzer_aspect --output_groups=rust_analyzer_crate_spec,rust_generated_srcs @//...` which ends up downloading OCI image manifests and pip and many other things.

If we only had rustlang in the repo, this might be ok, as we'd probably have one base image and that would be it. But we have vastly more other things, and this makes Rust developers sad when every day they are downloading large amounts of data for targets they will never build.

If this isn't addressable in Bazel today, please consider this a wishlist item. If it is though, then I think its a bug.

We haven't noticed this problem with IntelliJ's aspect based integration, but that might be chance rather than actually not have the behaviour.

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.