Skip to content

chore(toolchain): bump to Rust 1.95.0 (align with bevy + lance-graph)#145

Merged
AdaWorldAPI merged 2 commits into
masterfrom
claude/bump-rust-1.95
May 13, 2026
Merged

chore(toolchain): bump to Rust 1.95.0 (align with bevy + lance-graph)#145
AdaWorldAPI merged 2 commits into
masterfrom
claude/bump-rust-1.95

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

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

File Change
rust-toolchain.toml channel 1.94.11.95.0
Cargo.toml rust-version = "1.94""1.95"
.github/workflows/ci.yaml MSRV / BLAS_MSRV env 1.94.01.95.0; clippy matrix + dtolnay/rust-toolchain pin 1.94.11.95.0
src/impl_owned_array.rs::into_scalar Fix the one 1.95 clippy lint that fires (clippy::manual_checked_ops) via checked_div
.claude/board/UNUSED_INVENTORY_1.95.md NEW — catalogues 36 #[allow(dead_code|unused)] sites discovered during the bump sweep. 9 "likely actionable" + 27 "documented scaffolding". Follow-up backlog.

The one lint fix

// Before — flagged by `clippy::manual_checked_ops` (new in 1.95)
let index = (first - base) / size;

// After
let index = (first - base).checked_div(size).unwrap_or(0);

The size == 0 branch above already covers the divisor-is-zero case, so the unwrap_or is unreachable in practice — 0 is the safest fallback if some future refactor lets a size == 0 ZST sneak past the guard.

Test plan

  • cargo test --features rayon --lib1788 passed, 36 ignored, 0 failed
  • cargo clippy --features rayon --lib -- -D warnings → clean
  • No #![feature(...)] directives in src (verified — zero nightly usage)
  • No other 1.95-stabilized features ndarray would benefit from (AMX intrinsics still nightly per simd_amx.rs comment — inline-asm path stays)

Signal mining — UNUSED_INVENTORY_1.95.md

The bump sweep also produced a categorized inventory of 36 #[allow(...)] suppression sites. Top "actionable" items:

  • A1, A2 — Two // Needed for Rust 1.64 suppressions in impl_owned_array.rs:7 and iterators/mod.rs:24 are now stale (we're on 1.95).
  • A3SimdTier::Sse2 / WasmSimd128 phantom variants in hpc/simd_dispatch.rs:47 — already flagged by the round-1 audit fleet as dead.
  • A4-A9 — Misc dead-code in clam, jitson scan_config, ref_types, native backend, packed.

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

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.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread Cargo.toml
version = "0.17.2"
edition = "2021"
rust-version = "1.94"
rust-version = "1.95"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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.
@AdaWorldAPI AdaWorldAPI merged commit 74b1858 into master May 13, 2026
14 checks passed
AdaWorldAPI pushed a commit that referenced this pull request May 13, 2026
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.
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