rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

vendor command modifies Cargo.lock file

Open pdeva opened this issue 9 months ago • 3 comments

it adds dependencies which are then removed by cargo build since they are not actually used by our application. i dont think the vendor command is supposed to modify cargo.lock file

rules_rust: 0.58.0 cargo: 1.85.0

Image

pdeva avatar Mar 11 '25 17:03 pdeva

Can you share a repro for this? This is expected depending on your setup

UebelAndre avatar Mar 12 '25 14:03 UebelAndre

Ive noticed this as well and even with CARGO_BAZEL_ISOLATED=false pulling from private crates fails as well

ericmcbride avatar Mar 26 '25 19:03 ericmcbride

This would likely be caused by how crates_repository is setup. The Cargo.lock file is expected to be updated if you've defined all your dependencies in starlark. But if you are purely using Manifests then my expectation is the Cargo.lock file wouldn't have any of the Bazel things added to it.

UebelAndre avatar Mar 26 '25 20:03 UebelAndre