chore(toolchain): bump to Rust 1.95.0 (align with bevy + lance-graph)#145
Conversation
Aligns ndarray MSRV with the rest of the AdaWorldAPI stack (bevy already
on 1.95 for edition 2024, lance-graph bumped in a parallel PR). Single
rustc version across {ndarray, bevy, lance-graph, MedCare-rs} —
removes the `rustup run 1.95.0 …` vs default-toolchain confusion in
local dev and the bevy smoke-test CI.
Changes:
- `rust-toolchain.toml`: channel 1.94.1 → 1.95.0
- `Cargo.toml`: rust-version "1.94" → "1.95"
- `.github/workflows/ci.yaml`: MSRV / BLAS_MSRV env 1.94.0 → 1.95.0;
clippy matrix + dtolnay/rust-toolchain pin 1.94.1 → 1.95.0; updated
three explanatory comments that referenced the old pin.
- `src/impl_owned_array.rs::into_scalar`: fix the ONE 1.95 clippy lint
that fires on this codebase — `clippy::manual_checked_ops` wants
`checked_div` instead of the manual `if size == 0` + division. The
fix is `(first - base).checked_div(size).unwrap_or(0)`; the existing
`size == 0` guard above already handles the divisor-is-zero case, so
the unwrap is unreachable in practice. Comment explains why.
Test surface (post-bump, 1.95.0):
cargo test --features rayon --lib: 1788 passed, 36 ignored, 0 failed
cargo clippy --features rayon --lib -- -D warnings: clean
Signal mining:
- New file `.claude/board/UNUSED_INVENTORY_1.95.md` catalogues 36
`#[allow(dead_code|unused)]` suppression sites in the lib. Split into
9 "likely actionable" (A1-A9: stale Rust 1.64 imports, phantom
SimdTier variants already flagged by round-1 audit, dead clam code)
+ 27 "documented scaffolding" (B1-B10: cfg-conditional imports, rayon
gates, no_std polyfill helpers, doc-link helpers). Provides a
ready-made follow-up backlog without bundling the cleanup into this
bump PR.
Companion: lance-graph parallel PR bumps to 1.95 the same way.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9501793de5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| version = "0.17.2" | ||
| edition = "2021" | ||
| rust-version = "1.94" | ||
| rust-version = "1.95" |
There was a problem hiding this comment.
Update Docker images to the new MSRV
With rust-version raised to 1.95, the repository Docker builds are now broken: both Dockerfile and Dockerfile.avx512 still install and assert Rust 1.94.0 before running cargo build/cargo test, and Cargo will reject this package because its manifest requires rustc 1.95 or newer. This affects anyone using the documented docker build -t ndarray-test . or AVX-512 image path; please bump those Dockerfiles alongside the manifest MSRV.
Useful? React with 👍 / 👎.
PR #133 (commits 7ca1cf3 + ed59b3b) stripped all 13 nightly-only directives from `rustfmt.toml` and normalized the codebase to stable rustfmt 1.94.1. The CI fmt job, however, was never updated to leverage this — it still used: uses: dtolnay/rust-toolchain@nightly continue-on-error: true …which left fmt failures showing as "passing" on PR checks (an atom-bomb red flag for code-style invariants). The original `continue-on-error: true` rationale ("5,679 drift sites with nightly rustfmt") was dependent on the nightly-only directives that PR #133 already removed. The band-aid was stale. This commit completes what PR #133 implied: - Switch fmt job from `dtolnay/rust-toolchain@nightly` to `dtolnay/rust-toolchain@1.95.0` (the rust-toolchain.toml pin). - Remove `continue-on-error: true` — fmt failures now block merge, as they should. - Rename the job from `format/nightly` → `format/stable` to reflect the actual toolchain. - Replace the stale 24-line comment block with a 12-line explanation citing PR #133 as the source of stable-clean state. Plus the 3 drift sites between stable 1.94.1 and stable 1.95.0 (import ordering changes in `src/hpc/clam.rs`, `src/hpc/mod.rs`, `src/hpc/udf_kernels.rs`) — `cargo fmt --all` on 1.95.0 normalizes them. Bundled with the 1.95 bump since this PR is the trigger. Verified: `cargo fmt --all --check` clean on 1.95.0 post-commit. Companion to PR #133 / "where did that PR go" — completes the missed step.
The round-3-portable-simd fleet wrote agent files without running cargo fmt, so the format/stable CI job (now blocking per PR #145) flagged 34 drift sites across 12 files in src/simd_nightly/. `cargo fmt --all` normalizes. Zero semantic changes. Verified: `cargo fmt --all --check` clean.
Summary
Bumps ndarray MSRV from 1.94.1 → 1.95.0. Aligns with the rest of the AdaWorldAPI stack: bevy (already on 1.95 for edition 2024), lance-graph (companion PR), eliminates the
rustup run 1.95.0 …vs default-toolchain split in local dev + CI.Changes
rust-toolchain.toml1.94.1→1.95.0Cargo.tomlrust-version = "1.94"→"1.95".github/workflows/ci.yamlMSRV/BLAS_MSRVenv1.94.0→1.95.0; clippy matrix +dtolnay/rust-toolchainpin1.94.1→1.95.0src/impl_owned_array.rs::into_scalarclippy::manual_checked_ops) viachecked_div.claude/board/UNUSED_INVENTORY_1.95.md#[allow(dead_code|unused)]sites discovered during the bump sweep. 9 "likely actionable" + 27 "documented scaffolding". Follow-up backlog.The one lint fix
The
size == 0branch above already covers the divisor-is-zero case, so theunwrap_oris unreachable in practice —0is the safest fallback if some future refactor lets asize == 0ZST sneak past the guard.Test plan
cargo test --features rayon --lib→ 1788 passed, 36 ignored, 0 failedcargo clippy --features rayon --lib -- -D warnings→ clean#![feature(...)]directives in src (verified — zero nightly usage)simd_amx.rscomment — inline-asm path stays)Signal mining —
UNUSED_INVENTORY_1.95.mdThe bump sweep also produced a categorized inventory of 36
#[allow(...)]suppression sites. Top "actionable" items:// Needed for Rust 1.64suppressions inimpl_owned_array.rs:7anditerators/mod.rs:24are now stale (we're on 1.95).SimdTier::Sse2/WasmSimd128phantom variants inhpc/simd_dispatch.rs:47— already flagged by the round-1 audit fleet as dead.Documented scaffolding (B1-B10) — 27 sites — left untouched (rayon gates, cfg-conditional imports, no_std polyfill, doc-link helpers, NEON macros on non-aarch64). Comments justify each.
Companion PR
lance-graph bumps in parallel (separate PR). Once both merge, the AdaWorldAPI stack runs on a single Rust 1.95.0 toolchain end-to-end. Bevy plugin already passing on 1.95 (AdaWorldAPI/bevy PR #1).
Generated by Claude Code