toolchain: Rust 1.97.1 → 1.98.1, and the chunks_exact → as_chunks shift it forces - #302
Merged
Conversation
…it forces Workspace-wide sweep, repo 2 of 9. ndarray's own rule is honoured: the channel and Cargo.toml's rust-version move TOGETHER (1.97 -> 1.98). The toolchain comment is rewritten rather than edited. It opened 'Pinned to 1.97.1', restating the version in prose beside the channel line — and this file already carries the warning for exactly that: 'A stale comment on a version pin is how the next reader learns the wrong number.' A bump edits channel and leaves prose behind, so the prose now keeps only the rationale plus an append-only bump log. TWO 1.98 findings here, where lance-graph had one: 1. clippy::chunks_exact_to_as_chunks (new, default-on STYLE group) at 6 sites. 2. clippy::from_iter_instead_of_collect was REMOVED in 1.98, and src/lib.rs carried it in a crate-level allow list, which is itself an error now. The chunks_exact change is more than lint appeasement. chunks_exact was the right call when these buffers were 4096 and 16384 wide: the remainder is always empty there and the runtime width check is dead weight. At the 32+96 shape — classid plus the twelve-byte facet payload — the width is a compile-time fact, and as_chunks::<N> returns &[T; N], a type that CARRIES the width instead of re-checking it. That is the honest representation for a fixed-width register. Two of the six wanted the destructuring form, not the mechanical swap: asum_f32 and asum_f64 called chunks_exact(N) AND chunks_exact(N).remainder() separately, and as_chunks returns both halves at once, so each kernel now makes one call where it made two. Gate, because these are AVX-512 kernels: clippy --all-targets -D warnings exit 0, cargo fmt clean, and the full library suite at 2278 passed / 0 failed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
Bugbot couldn't run - usage limit reachedBugbot 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_bec01a95-e227-4cc7-bff3-15a90c848942) |
Caught by reading the PR's own check names: CI reported tests/1.97.1 and clippy/1.97.1 AFTER the toolchain file said 1.98.1. Unlike lance-graph, whose eleven workflows all read rust-toolchain.toml with no toolchain input, this repo's CI pins the version explicitly via dtolnay/rust-toolchain@<version> plus an MSRV env var. So bumping rust-toolchain.toml alone left CI still testing the OLD toolchain — the bump would have been cosmetic where it is actually gated. Six real pins moved: MSRV, BLAS_MSRV, the clippy matrix entry, and three dtolnay/rust-toolchain@ steps. Six comments also restated the version in prose and are rewritten rather than edited, the same lesson rust-toolchain.toml already carries: a stale comment on a version pin is how the next reader learns the wrong number. The matrix comment now names WHERE the number lives (three places in this file, because CI does not read the toolchain file) instead of duplicating the number itself, and points at the bump log as the single record of why each move happened. The comment it replaces still described the 1.94.1 bump as 'this PR'. Verified: zero remaining 1.97.1 references in ci.yaml, and the YAML parses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V
AdaWorldAPI
marked this pull request as ready for review
September 5, 2026 19:56
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Workspace-wide sweep to current stable (1.98.0 released 2026-08-20, 1.98.1 on 2026-09-01). Repo 2 of 9. This repo's own rule is honoured: the channel and
Cargo.toml'srust-versionmove together (1.97 → 1.98).Two findings, where lance-graph had one
clippy::chunks_exact_to_as_chunks— new in 1.98, default-on style groupclippy::from_iter_instead_of_collect— removed in 1.98, and carried insrc/lib.rs's crate-level allow list, so the allow itself is now an errorThe second one does not exist in lance-graph, which is why the sweep measures each repo rather than generalising from the first.
Why
as_chunksis the right shape here, not just lint appeasementchunks_exactwas the correct call when these buffers were 4096 and 16384 wide: the remainder is always empty at those widths and the runtime width check is dead weight. At the 32+96 shape, the classid plus the twelve-byte facet payload, the width is a compile-time fact, andas_chunks::<N>returns&[T; N]— a type that carries the width instead of re-checking it. That is the honest representation for a fixed-width register.Two of the six wanted the destructuring form rather than a mechanical swap:
asum_f32andasum_f64calledchunks_exact(N)andchunks_exact(N).remainder()separately, andas_chunksreturns both halves at once, so each kernel now makes one call where it made two.The toolchain comment is rewritten, not edited
It opened
# Pinned to 1.97.1, restating the version in prose beside thechannelline. This file already carries the warning for exactly that failure: "A stale comment on a version pin is how the next reader learns the wrong number." A bump editschanneland leaves prose behind, so the prose now keeps only the rationale, plus an append-only bump log.Gate
These are AVX-512 kernels, so the test suite is the real gate, not clippy:
cargo clippy --all-targets -- -D warnings→ exit 0cargo fmt --all -- --check→ cleancargo test --lib→ 2278 passed, 0 failed, 30 ignoredAll run through bare
cargoon the new pin, which is what CI does.🤖 Generated with Claude Code
https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V
Generated by Claude Code