Skip to content

chore: update for rust 1.99 clippy and deprecations - #245

Merged
jacderida merged 1 commit into
mainfrom
chrisoneil/v2-1399-update-all-crates-for-the-new-rust-release
Oct 1, 2026
Merged

jacderida merged 1 commit into
mainfrom
chrisoneil/v2-1399-update-all-crates-for-the-new-rust-release

Conversation

@jacderida

Copy link
Copy Markdown
Member

Rust 1.99 (released 2026-09-28) broke CI on main. Clippy, Documentation, all three
Build/Test matrices, the three storage-filesystem jobs and the WebRTC devnet job fail, because
ci.yml sets RUSTFLAGS: -D warnings and the new toolchain reports two new lint families in this
tree. The same tree passed every job on 1.98.1 (the Clippy run on #237, merged 2026-09-28). This is
also what fails #244 — those failures are pre-existing on main, not caused by that PR, and this
unblocks it.

Atomic::fetch_update is deprecated, renamed try_update for consistency with the new infallible
update. It is the same method under a new name, but only stable from 1.95, so the rename takes
the MSRV with it.

assert_is_empty is a new pedantic lint, picked up through this crate's blanket
pedantic = { level = "warn" }. Its point is that a bare assert! prints nothing useful on
failure; clippy's own suggestion is of the form assert_eq!(dirs, [] as [String; 0]), so these use
a message carrying the value instead — same diagnostic, better reading in a test.

  • rename the two fetch_update calls in web_rtc
  • raise rust-version to 1.95 and the MSRV job to 1.95.0, and update the MSRV quoted in
    README.md and docs/WEBRTC_DIRECT_TESTNET.md
  • give the 37 flagged assertions a failure message, binding a local first where the subject was a
    method call so the value can be printed

One of four PRs for V2-1399; the others are in saorsa-transport (the same deprecation, same MSRV
bump), saorsa-core and ant-protocol. ant-client and evmlib were checked and need nothing.

Linear issue

Closes V2-1399

Risk tier

  • T0 — docs / tooling / CI / pure UX-output. Repo CI only.
  • T1 — client-only, no network-facing behavior change. CI + prod compat smoke.
  • T2 — node/client logic with behavioral surface, no protocol/format/economics change. Dev testnet + ADR.
  • T3 — protocol / storage format / payments / routing. T2 evidence + adversarial testing.

Proposing T0: the only non-test source change is the try_update rename, which is the same
method, signature and memory orderings. Every assertion condition is unchanged — only the failure
message is new. If the MSRV bump counts as consumer-facing rather than tooling, this is T1.

Compatibility

  • Wire: none
  • Storage: none
  • API: none (the MSRV floor moves to 1.95; no public item changes)

Semver impact

  • breaking
  • feature
  • fix

The lint fixes alone would be a patch, but raising rust-version is visible to consumers — anyone
on 1.91–1.94 can no longer build the crate — so it wants a minor bump.

Test evidence

T0: repo CI only. All runs on 1.99.0 (b940084d7, 2026-09-28), the toolchain that produced the
failures:

  • cargo fmt --all -- --check — clean
  • cargo clippy --all-targets --all-features --keep-going -- -D warnings — clean
  • RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps — clean (the Documentation job)

--keep-going was load-bearing for the sweep: clippy stops at the first failing target, so the
lints hid behind one another. The 37 sites came out in three passes — 27 in the lib, then 8 across
tests/e2e and tests/webrtc_direct_devnet.rs, then 2 in tests/poc_bootstrap_stall.rs — and the
--keep-going run is what confirms none are left.

Test suites were not run locally; CI runs them on this PR. The jobs to watch are the ones that were
failing on main, plus Rust 1.95 MSRV, which this PR re-points.

New dependency

none

ADR

n/a

Mitigation / rollback

Revert the commit. The two halves are independent if only one turns out to be unwanted: the
deprecation can instead be silenced with #[allow(deprecated)] at the two call sites, keeping the
1.91 floor, and the lint can instead be turned off with assert_is_empty = "allow" under
[lints.clippy].

🤖 Generated with Claude Code

Rust 1.99 broke CI on `main`: `Clippy`, `Documentation`, all three `Build`/`Test` matrices, the
three storage-filesystem jobs and the WebRTC devnet job fail, because the workflow sets
`RUSTFLAGS: -D warnings` and the new toolchain reports two new lint families here. The same tree
passed every job on 1.98.1, and PR #244 is blocked by it rather than by anything in that PR.

`Atomic::fetch_update` is deprecated, renamed `try_update` for consistency with the new infallible
`update`. It is the same method under a new name, but only stable from 1.95, so the rename takes
the MSRV with it.

`assert_is_empty` is a new pedantic lint, picked up through the blanket `pedantic = "warn"`. Its
point is that a bare `assert!` prints nothing useful on failure; clippy's suggestion is of the form
`assert_eq!(dirs, [] as [String; 0])`, so these use a message carrying the value instead, which
gives the same diagnostic and reads better in a test.

- rename the two `fetch_update` calls in `web_rtc`
- raise `rust-version` to 1.95 and the MSRV job to 1.95.0, and update the MSRV quoted in
  `README.md` and `docs/WEBRTC_DIRECT_TESTNET.md`
- give the 37 flagged assertions a failure message, binding a local first where the subject was a
  method call so the value can be printed

All assertion conditions are unchanged, so every test passes or fails exactly as before.

Verified on 1.99.0: `cargo fmt --all -- --check`, `cargo clippy --all-targets --all-features
--keep-going -- -D warnings` and `RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps`,
all clean. The sweep used `--keep-going` deliberately: clippy aborts at the first failing target,
so the lints hid behind one another across `src`, `tests/e2e` and the devnet tests.

Closes V2-1399

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@dirvine dirvine left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved after focused review of head 6f73aa3336b762302353efc67f059b8d48a8d6be. No blocking findings.

Reviewed all assertion changes: predicates remain unchanged and newly bound method results are evaluated once. Both WebRTC atomic call sites retain their closures and memory orderings. Rust 1.99.0 core source confirms fetch_update delegates directly to try_update, stable since 1.95.0. Manifest, MSRV CI and documented toolchain floor agree. Rust 1.95 MSRV and Clippy checks pass. Consumer-visible caveat: source builds now require Rust 1.95; preserve the stated release-versioning treatment.

Review scope: full PR diff and relevant source/API semantics, live CI and review-thread inspection, plus one lightweight GLM-5.2 independent cross-check (no full panel). No local crate build/test run; execution evidence is GitHub CI.

Still pending at approval: Test (ubuntu-latest), Test (macos-latest), Test (windows-latest), Storage on ext4, Storage on xfs, Storage on btrfs, Build (ubuntu-latest), Build (macos-latest), Build (windows-latest), WebRTC Direct five-node devnet. Code approval does not waive these checks or authorise merging before the normal CI gates are satisfied.

@jacderida
jacderida merged commit 26129a2 into main Oct 1, 2026
20 checks passed
@jacderida
jacderida deleted the chrisoneil/v2-1399-update-all-crates-for-the-new-rust-release branch October 1, 2026 21:25
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