Skip to content

Added Rust 1.98.0 - #4244

Merged
UebelAndre merged 2 commits into
bazelbuild:mainfrom
UebelAndre:rustup
Aug 28, 2026
Merged

UebelAndre merged 2 commits into
bazelbuild:mainfrom
UebelAndre:rustup

Conversation

@UebelAndre

Copy link
Copy Markdown
Collaborator

@UebelAndre
UebelAndre marked this pull request as ready for review August 27, 2026 18:49
@UebelAndre
UebelAndre added this pull request to the merge queue Aug 28, 2026
Merged via the queue into bazelbuild:main with commit 9e8445f Aug 28, 2026
3 checks passed
thad-imbue added a commit to imbue-ai/datalib that referenced this pull request Sep 25, 2026
…_rust 0.74.0 (#796)

## Formatting from a checkout whose path has spaces

`@rules_rust//:rustfmt` takes Bazel labels, not file paths: it pastes its arguments into `bazel query 'set(...)'`, which splits on whitespace. So from a checkout like `/Users/thad/Imbue Dropbox/...` an absolute path breaks into `/Users/thad/Imbue`, `Dropbox/Thad`, …, and a relative path names no target with an `edition`, so nothing gets formatted. Upstream `main` behaves the same way.

New: `bazelisk run //:rustfmt -- <file or directory>...` (`scripts/rustfmt.sh`). It runs the toolchain's rustfmt (through rules_rust's public `tools/upstream_wrapper:rustfmt`) with the aspect's flags: rules_rust's `rustfmt.toml`, the toolchain's default edition, `skip_children=true`. Paths are relative to where you ran it; a directory means every `.rs` under it; `--check` is passed through. `docs/dev/testing.md` and the `.bazelrc` comment pointed at `cargo fmt`, which bypasses Bazel; they point here now.

## rules_rust 0.73.0 → 0.74.0

0.73.0 had no sha256 for Rust 1.98.0, so the toolchain was downloaded with no checksum. Bazel's repository cache is looked up by checksum, so it could never serve that download: every new worktree fetched rustc, cargo, clippy and rust-std again. 0.74.0 (2026-08-28, past the 7-day burn-in) adds 1.98.0 (bazelbuild/rules_rust#4244). `rules_rust_prost` moves with it. `Cargo.lock` didn't change.

`MODULE.bazel.lock` has to be regenerated with a build that evaluates the root `crate` extension: `bazelisk build --nobuild //...`. The first push missed that (the local builds were crates with no third-party deps), and CI's `--lockfile_mode=error` aborted on the stale digest. Not `bazel mod deps`: it aborts on protobuf 36.0.bcr.1's lockfile-less crate_universe use. That was already true under 0.73.0 (the release skill says so), whatever the second commit's message claims. `.github/dependabot.yml` gave `mod deps` as the repin recipe; it now gives the build.

## Verified (from this worktree, whose path has spaces)

- With a deliberate misformat in `datalib/backend/query/src/lib.rs`, `bazelisk build //datalib/backend/query/...` failed with `Diff in …lib.rs`. After `bazelisk run //:rustfmt -- datalib/backend/query/src/lib.rs`, the same build passed.
- The same fix also worked with an absolute path containing spaces, and with a directory given from inside `datalib/backend`.
- `--check` exits 1 with the diff on a misformatted file and 0 on a clean one. No args exits 2 with usage; a missing path exits 1.
- `bazelisk run //:rustfmt -- --check datalib/backend` passes on the whole tree, so this matches the aspect's formatting across every crate.
- `bazelisk run //:lint_repo` and `bazelisk test //:lint` pass. `bazelisk build --nobuild --lockfile_mode=error //...` passes, as does the musl `:dist` analysis (`-c opt --config=release --config=musl-x86_64`). I haven't run the full `//...` build and tests locally; the rules_rust bump re-keys every Rust action, so that's left to CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)



Co-Authored-By: Claude Opus 5.5 <[email protected]>
@UebelAndre UebelAndre mentioned this pull request Oct 23, 2026
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.

2 participants