Replies: 1 comment 1 reply
-
Hi! Sorry, this sounds frustrating! The purpose behind the scanning is to make sure your MODULE.bazel is actually up to date - if you add a Cargo.toml file to your workspace, and don't remember to update the workspace Cargo.toml or the MODULE.bazel, we'd otherwise start giving incorrect results. One way of fixing this would be to start respecting .bazelignore in the scanning (#3425). Another could be adding a "no_really_trust_me_my_crates_manifest_list_is_up_to_date" option to the repository rule to just disable the scanning entirely. Yet another could be to make sure the repository rule can properly detect and track the Cargo.toml files based just on the workspace Cargo.toml, and avoid needing to list the transitive ones at all. It's possible we're already doing this (or something approaching it) with this code - if someone can run some experiments where they do a resolve, create a new Cargo.toml file in the workspace, rebuild, and make sure we re-do the resolve with no intervention, we could potentially remove this entirely. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am setting up rules_rust in a bzlmod workspace.
In my
MODULE.bazel
I list theCargo.toml
files explicitely.When I run
bazel mod deps
(or some other Bazel command) it fails with:This is expected. The
data
directory is listed in.bazelignore
. It's also not listed inCargo.toml
.Why is
rules_rust
trying to scan forCargo.toml
files? I listed all I want explicitly in themanifests
list. Is there a way to exclude thedata
folder from scanning?Beta Was this translation helpful? Give feedback.
All reactions