Description
After upgrading the root module to rules_rust 0.70.0, bazel mod deps fails when the workspace contains an existing crate_universe lockfile generated before the upgrade and a downstream module still declaring rules_rust 0.68.1.
Expexted behaviour:
Tbh, not fully sure what would be a reasonable expectation.
It seems that the lockfile digest calculation lead to a breaking change from 0.68.1 -> 0.69.0
Reproduction steps
Standalone reproducer:
git clone https://github.com/FaBrand/rules_rust_incompatibility.git
cd rules_rust_incompatibility
bazel mod deps
The reproducer contains:
- root module using rules_rust 0.70.0
- local downstream module using rules_rust 0.68.1
- both modules using crate_universe with public crates
- checked-in crate-universe lockfiles generated before the root upgrade
Additional context
Observed error:
Error: Digests do not match: Current Digest("f723cdc33f33adbb226b472755c9d5e64631a013b3166296d488aa58fbafb8f7") != Expected Digest("e4409fddd63f29a438be3e7df8856a5dd9702bf47bca2ade256eaf0c06aea469")
The current `lockfile` is out of date for 'root_crates'. Please re-run bazel using `CARGO_BAZEL_REPIN=true` if this is expected and the lockfile should be updated.
ERROR: error evaluating module extension @@rules_rust+//crate_universe:extension.bzl%crate
Impact
This blocks a normal rules_rust upgrade path because the lockfile in version 0.70.0 yields a different digest than with 0.69.0 (or 0.68.1 as tested)
Bazel and rules_rust version
Bazel: 8.7.0
rules_rust:
- root module: 0.70.0
- downstream/local module: 0.68.1
Description
After upgrading the root module to
rules_rust0.70.0,bazel mod depsfails when the workspace contains an existingcrate_universelockfile generated before the upgrade and a downstream module still declaringrules_rust0.68.1.Expexted behaviour:
Tbh, not fully sure what would be a reasonable expectation.
It seems that the lockfile digest calculation lead to a breaking change from 0.68.1 -> 0.69.0
Reproduction steps
Standalone reproducer:
git clone https://github.com/FaBrand/rules_rust_incompatibility.git cd rules_rust_incompatibility bazel mod depsThe reproducer contains:
Additional context
Observed error:
Impact
This blocks a normal rules_rust upgrade path because the lockfile in version 0.70.0 yields a different digest than with 0.69.0 (or 0.68.1 as tested)
Bazel and rules_rust version
Bazel: 8.7.0
rules_rust: