Skip to content

Bump Rust toolchain 1.97.1 -> 1.98.1 - #111

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/rust-1981-bump
Sep 5, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
claude/rust-1981-bump

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Bumps rust-toolchain.toml channel from 1.97.1 to 1.98.1.
  • Removes from_iter_instead_of_collect = "warn" from ruff_annotate_snippets's [lints.clippy] table — the lint was removed in 1.98 and the stale entry now emits renamed_and_removed_lints (a warning that explicitly ignores -D warnings, so it was stale rather than CI-breaking).
  • Rewords a prose comment in ruff_r2il/Cargo.toml that duplicated the old toolchain number, so it points at rust-toolchain.toml instead of restating a version that will drift again.

Pin audit

Grepped for every other place a toolchain version could be pinned; none needed a change:

  • Every .github/workflows/*.{yaml,yml} "Install Rust toolchain" step reads rust-toolchain.toml implicitly (rustup show / dtolnay/rust-toolchain@stable) — no explicit 1.97 string anywhere.
  • The cargo-build-msrv CI job derives its version from workspace.package.rust-version in Cargo.toml at runtime (SebRollen/toml-action + rustup default "${MSRV}"), independent of the toolchain channel — left untouched (still 1.95).
  • Dockerfile installs from the copied rust-toolchain.toml, no separate version string.
  • The only genuine duplicate was the prose comment in ruff_r2il/Cargo.toml (fixed above).

1.98 clippy delta

Only two new-in-1.98 items apply here:

  • clippy::from_iter_instead_of_collect (removed) — found and removed, see above.
  • clippy::chunks_exact_to_as_chunks (new, style, default-on) — cannot fire anywhere in this repo; grep -rn '\.chunks_exact(' across crates/ returns zero hits.

Test Plan

Disk-constrained environment (~7 GB free on a shared quota); verified a scoped subset rather than the full CI command, with CARGO_PROFILE_DEV_DEBUG=0 CARGO_INCREMENTAL=0 on every invocation:

  • cargo fmt --all --check — clean, exit 0.
  • cargo clippy -p ruff_cpp_spo -p ruff_csharp_spo -p ruff_python_spo -p ruff_ruby_spo -p ruff_sqlalchemy_spo --all-targets -- -D warnings — clean, exit 0, no warnings.
  • cargo clippy -p ruff_annotate_snippets --all-targets -- -D warnings — clean, exit 0, before-and-after the from_iter_instead_of_collect removal (confirmed the stale-lint warning present before, gone after).
  • crates/ruff_r2il (workspace-excluded) does not compile on main today — E0063/E0004 against its sibling r2sleigh checkout's current r2il/r2ssa API (missing AddressSpace::aliases field, unhandled SpaceId::Unresolved variant). This is a pre-existing cross-repo drift issue, unrelated to the toolchain bump (verified the failure is a type-level API mismatch, not a compiler regression) — left unfixed as out of scope for this PR.

Not run, explicitly: the full cargo clippy --workspace --all-targets --all-features --locked -- -D warnings CI command, and cargo test/cargo nextest run across the workspace — both would not fit the available disk budget in this environment. CI will run the full command on this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Updated the Rust toolchain to version 1.98.1.
    • Aligned project guidance with the workspace’s shared Rust configuration.
    • Simplified lint configuration to keep code-quality checks consistent across the project.

No other genuine version pin exists in this repo: every "Install Rust
toolchain" CI step reads rust-toolchain.toml (`rustup show`), the MSRV
job derives its version from Cargo.toml's workspace.package.rust-version
at runtime, and the Dockerfile installs from the copied
rust-toolchain.toml. Only a prose comment in ruff_r2il/Cargo.toml
duplicated the old toolchain number; reworded it to point at
rust-toolchain.toml instead of restating the version.

Also drops `from_iter_instead_of_collect = "warn"` from
ruff_annotate_snippets's [lints.clippy] table: the lint was removed in
1.98 and the stale entry now fires `renamed_and_removed_lints` (a
warning that explicitly ignores -D warnings, so it wasn't failing CI,
just stale).

The only other 1.98 clippy delta, `chunks_exact_to_as_chunks`, cannot
fire anywhere in this repo: no source file calls `.chunks_exact(`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V
@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 71 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: c9f54976-96d8-4a46-8d82-be09dc3d5be9

📥 Commits

Reviewing files that changed from the base of the PR and between 7caedf3 and 2a314fb.

📒 Files selected for processing (3)
  • crates/ruff_linter/src/linter.rs
  • crates/ruff_linter/src/noqa.rs
  • crates/ty_python_semantic/src/types/infer/tests.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 6947cd78-976e-40b7-b29c-9711669bc3a9

📥 Commits

Reviewing files that changed from the base of the PR and between c1d7c03 and 7caedf3.

📒 Files selected for processing (3)
  • crates/ruff_annotate_snippets/Cargo.toml
  • crates/ruff_r2il/Cargo.toml
  • rust-toolchain.toml
💤 Files with no reviewable changes (1)
  • crates/ruff_annotate_snippets/Cargo.toml

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The pull request updates the Rust toolchain from 1.97.1 to 1.98.1, aligns a pinning comment with workspace configuration, and removes one Clippy lint setting.

Changes

Rust configuration maintenance

Layer / File(s) Summary
Toolchain configuration alignment
rust-toolchain.toml, crates/ruff_r2il/Cargo.toml
The Rust toolchain changes to 1.98.1. The pinning comment now references workspace configuration.
Clippy configuration cleanup
crates/ruff_annotate_snippets/Cargo.toml
The from_iter_instead_of_collect lint setting is removed.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 7caed

This updates the pinned Rust toolchain and related configuration cleanup; no current merge-readiness risk is identified.

Suggested reviewers: claude

Poem

A rabbit checks the toolchain bright
One version hops into the light
A stale lint flag leaves the crate
The workspace notes now point straight
Configuration rests just right

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: updating the Rust toolchain from 1.97.1 to 1.98.1.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Sep 5, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_f86f7eb5-5ec7-40e0-abad-754a1ce0bf11)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 5, 2026 19:58
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

The toolchain bump turns `-D warnings` red on four pre-existing sites.
None of the four lints is new in 1.98; they were simply never enforced
against this code before the pin moved.

`format_push_string` (ty_python_semantic tests, two sites): the
`push_str(&format!(..))` pairs allocate an intermediate `String` per
loop iteration. Rewritten as `let _ = write!(..)`, the idiom this repo
already uses at 105 call sites, with `use std::fmt::Write as _` at the
top of the file per the imports-at-the-top rule. The anonymous import
form avoids colliding with the file's `use super::*`.

`useless_format` (ruff_linter, two sites): `format!("{x}")` on a value
that already renders to the same string, replaced with `to_string()`.

Output is unchanged in all four cases. The `write!` rewrite was checked
against a standalone reproduction of the loop rather than a full
workspace build, which will not fit in the available disk here; CI runs
the real gate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V
The previous commit replaced `format!("{snapshot}")` with
`snapshot.to_string()`, which silenced `useless_format` and immediately
tripped `implicitly_cloning_a_string`: `snapshot` is already a `String`,
so `to_string` goes through `Deref<Target = str>` and allocates a second
copy of the same bytes.

It is the last use of the binding in that function and the macro takes
it by value, so passing it directly is both what the code means and
what the lints want. The argument's type is unchanged — `format!` also
produced a `String`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V
@AdaWorldAPI

Copy link
Copy Markdown
Owner Author

Build ty (pr) is red, and it is not this PR's.

The job is killed by its own timeout-minutes: 5 in .github/workflows/ty-ecosystem-analyzer.yaml. Its log ends mid-compile with The operation was canceled and no error of any kind: the run was created at 20:25:37 and the job died at 20:30:52, five minutes and change later, while still building tikv-jemallocator. A cold build of ty does not fit in that budget on a GitHub-hosted runner.

This is not new and not related to the four clippy fixes here. The last ten runs of that workflow in this repository are cancelled, every one, across two unrelated branches months apart. Its sibling Build ty (base) passes because it builds a different revision with a warm cache.

Re-running it would hit the same deterministic timeout, so the one permitted re-run is left unspent. Raising the budget would fix it, but that is a change to an unrelated workflow and I cannot verify a build that takes longer than the limit from here, so I have not widened this PR with it.


Generated by Claude Code

@AdaWorldAPI

Copy link
Copy Markdown
Owner Author

Three more checks have since gone red — cargo test (linux), cargo test (windows-latest) and Fuzz for new ty panics — and they are the same class as Build ty (pr) above, not something this PR introduced.

All three are cancelled, not failed. They started within one second of each other at 20:26:59 and were killed within three seconds of each other at 20:47:1x — exactly the timeout-minutes: 20 each carries in ci.yaml. Simultaneous start plus simultaneous death at the twenty-minute mark is three independent budgets expiring together, not a test result.

The base-branch test settles it: every run of ci.yaml in this repository is cancelled, including runs on main itself in August on unrelated branches. This fork's CI has never completed a full pass; a cold-cache build of a workspace this size does not fit the budget on the available runners. The workflow already anticipates this — one job's timeout reads github.repository == 'astral-sh/ruff' && 10 || 20, granting forks double — it is just still not enough here.

What matters for this PR did pass: cargo clippy is green, which is the check the toolchain bump could actually break and the reason the four lint fixes exist. cargo fmt is green too.

Raising the budgets would be a change to unrelated CI affecting every job in the repository, and I cannot verify a suite that exceeds the limit from here, so I have not widened this PR with it. Re-running would hit the same deterministic timeouts.


Generated by Claude Code

@AdaWorldAPI

Copy link
Copy Markdown
Owner Author

Correcting my previous comment, and narrowing it: the rollup's own log shows nine of the ten required jobs passed and exactly one gates this PR.

cargo-fmt success | cargo-clippy success | cargo-test-wasm success
cargo-build-msrv success | shellcheck success | scripts success
prek success | docs success | python-package success
cargo-test-linux CANCELLED

So Build ty (pr), cargo test (windows-latest) and the fuzz job are not required and do not block; I implied otherwise above. cargo-build-msrv passing is worth noting on its own — the MSRV build is green under the bumped toolchain.

And the cause is sharper than "fork runners are slow." Line 347 reads:

runs-on: ${{ github.repository == 'astral-sh/ruff' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
timeout-minutes: 20

Upstream runs this job on a sixteen-core Depot runner. A fork falls back to ubuntu-latest and gets a fraction of that, with the identical twenty-minute budget — a budget calibrated for the machine forks do not get. The workflow already knows to compensate elsewhere: another job's timeout reads github.repository == 'astral-sh/ruff' && 10 || 20. This job just never received the same treatment.

The minimal fix is that same pattern, one line:

timeout-minutes: ${{ github.repository == 'astral-sh/ruff' && 20 || 45 }}

It changes nothing upstream and only relaxes the budget where the runner is smaller. I am proposing rather than pushing it, since it is unrelated CI and I cannot verify a suite that exceeds the current limit from here — but it is a one-line change to the single job blocking this PR, not the sweeping CI edit I described earlier.


Generated by Claude Code

@AdaWorldAPI
AdaWorldAPI merged commit cee533a into main Sep 5, 2026
34 of 40 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.

2 participants