Skip to content

Update rules_rust to 0.73.0; drop unused rules_rust WORKSPACE setup - #812

Merged
helly25 merged 1 commit into
bazel-contrib:masterfrom
helly25:remove-workspace-rules-rust
Aug 4, 2026
Merged

Update rules_rust to 0.73.0; drop unused rules_rust WORKSPACE setup#812
helly25 merged 1 commit into
bazel-contrib:masterfrom
helly25:remove-workspace-rules-rust

Conversation

@helly25

@helly25 helly25 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Re-applies the rules_rust 0.70.0 → 0.73.0 upgrade (#787) that had to be reverted in #811, by first removing the root cause: the unused rules_rust setup in tests/WORKSPACE.

Why the upgrade broke hybrid mode: rules_rust ≥ 0.71 no longer ships rust/repositories.bzl (WORKSPACE support removed upstream). In the hybrid CI jobs (Bazel 7/8 with --enable_bzlmod --enable_workspace), the root module's bazel_dep repos shadow same-named WORKSPACE repos — so the load("@rules_rust//rust:repositories.bzl", ...) in tests/WORKSPACE resolved to the bzlmod rules_rust (not the WORKSPACE-pinned 0.67.0 http_archive) and failed with:

ERROR: Error computing the main repository mapping: cannot load '@@rules_rust+//rust:repositories.bzl': no such file

This killed every bazel invocation in those jobs, including ones that don't use rust at all (msan). Bazel 9 jobs were unaffected (WORKSPACE is gone there); pure-WORKSPACE jobs (bzlmod=false) were unaffected (no shadowing).

Why removing the WORKSPACE setup is safe: the rules_rust tests in run_external_tests.sh only run with bzlmod enabled (Bazel 9+), and nothing else in the tests workspace uses rust. The WORKSPACE block was dead weight. A comment now documents why it must not be re-added.

Closes #787.

Test plan

rules_rust >= 0.71 no longer ships rust/repositories.bzl (WORKSPACE
support removed). Under hybrid mode (--enable_bzlmod --enable_workspace,
i.e. Bazel 7/8 CI jobs), the root module's bazel_dep repos shadow
same-named WORKSPACE repos, so the load() of that file in tests/WORKSPACE
resolved to the bzlmod rules_rust and broke the main repository mapping
for every hybrid invocation - this is what forced the rules_rust upgrade
to be reverted in bazel-contrib#811.

The WORKSPACE rules_rust setup is dead weight anyway: the rules_rust
tests in run_external_tests.sh only run with bzlmod enabled. Remove it
and re-apply the rules_rust 0.70.0 -> 0.73.0 upgrade (bazel-contrib#787).
@helly25
helly25 enabled auto-merge (squash) August 4, 2026 07:36
@helly25
helly25 merged commit c22321a into bazel-contrib:master Aug 4, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant