Skip to content

fix: keep Clippy green on the Rust 1.99 stable toolchain - #34

Merged
openai0229 merged 1 commit into
mainfrom
fix/stable-clippy-drift
Oct 8, 2026
Merged

openai0229 merged 1 commit into
mainfrom
fix/stable-clippy-drift

Conversation

@openai0229

Copy link
Copy Markdown
Contributor

The workspace Clippy job lints with the floating stable toolchain, on top of clippy::all + clippy::pedantic, with -D warnings. The Rust 1.99 stable release therefore fails that job on unchanged sources and blocks the v0.0.1 release pipeline (Release CI reuses ci.yml from the tag).

Three new diagnostics are addressed with lint-only changes:

  • AtomicU64::fetch_update is deprecated in favour of try_update, which is still unstable before Rust 1.95 while the workspace MSRV is 1.88. The MSRV-compatible calls keep fetch_update behind a localized #[allow(deprecated)] that records the reason.
  • clippy::double_must_use now fires on #[async_trait] traits, because async-trait 0.1.91 stamps #[must_use] on the generated boxed futures, and on one hand-written #[must_use] accessor whose impl ExactSizeIterator return type is already #[must_use]; that redundant attribute is removed.
  • The new pedantic clippy::assert_is_empty lint fires on empty assertions in the test suites; the assertions keep their original meaning and now report the length or an explicit message on failure.

Validation completed locally against the same steps as the Rust and Rust 1.88 jobs:

  • cargo clippy --workspace --exclude chat2db-desktop --all-targets --all-features --locked -- -D warnings on 1.99.0 passed.
  • cargo check --workspace --exclude chat2db-desktop --all-targets --all-features --locked on 1.88.0 (MSRV) passed.
  • cargo fmt --all --check passed.
  • cargo test --workspace --exclude chat2db-desktop --locked: 824 passed, 10 ignored. Ran from a short temporary worktree because an existing macOS Unix-socket test exceeds SUN_LEN from the longer feature-worktree path.
  • cargo test -p chat2db-java-bridge --features test-fixture --test supervisor --locked: 53 passed.

The two edited Java/H2 integration test files were compiled here; their real database/H2 execution is covered by repository CI. chat2db-desktop keeps its three fetch_update calls because its Clippy job is pinned to Rust 1.88.0 and does not lint them.

Review entry points: crates/chat2db-java-bridge/src/supervisor/community.rs, crates/chat2db-core/src/native_driver.rs, and the fetch_update sites in crates/chat2db-core/src/{operation.rs,agent/hub.rs}.

AI assistance: implementation, review, and verification performed with Codex.

The workspace Clippy job lints with the floating `stable` toolchain, on top of
`clippy::all` + `clippy::pedantic`, with `-D warnings`. The Rust 1.99 stable
release therefore breaks the job without any source change:

- `AtomicU64::fetch_update` is deprecated in favour of `try_update`, which is
  still unstable before Rust 1.95 while the workspace MSRV is 1.88. The
  MSRV-compatible calls keep `fetch_update` behind a localized
  `#[allow(deprecated)]` with the reason recorded next to it.
- `clippy::double_must_use` now fires on `#[async_trait]` traits, because
  async-trait 0.1.91 stamps `#[must_use]` on the generated boxed futures, and
  on the `CommunityClasspath::artifacts` accessor, whose
  `impl ExactSizeIterator` return type is already `#[must_use]`. That accessor
  still needs an attribute for `clippy::must_use_candidate` on Rust 1.88, so it
  now carries an explicit reason, which both toolchains accept.
- The new pedantic `clippy::assert_is_empty` lint fires on the empty assertions
  in the test suites.

Only lint compliance changed; assertions keep their original meaning.
@openai0229
openai0229 force-pushed the fix/stable-clippy-drift branch from f58a145 to aa15697 Compare October 8, 2026 05:24
@openai0229
openai0229 merged commit c92c745 into main Oct 8, 2026
11 checks passed
@openai0229
openai0229 deleted the fix/stable-clippy-drift branch October 8, 2026 06:09
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.

1 participant