chore - Bump MSRV/toolchain to stable 1.93 and fix strict clippy#530
chore - Bump MSRV/toolchain to stable 1.93 and fix strict clippy#530mingley wants to merge 7 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughUpgrade Rust toolchain to 1.93.0 via Cargo.toml and rust-toolchain.toml with clippy allowances for compatibility. Refactor Error::GrpcAPI to hold plain ChangesToolchain upgrade and compatibility
Error type restructuring
Iterator and type conversion simplifications
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Addressed local review findings #2 and #3 in
Also added a dedicated "Follow-on PR Callout: Dependency Modernization" section to the PR description with major version gaps and rationale. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/common/errors.rs`:
- Around line 202-211: The test grpc_api_variant_accepts_tonic_status_payload is
gated with #[cfg(not(clippy))], causing it to be skipped under cargo clippy;
remove the #[cfg(not(clippy))] attribute so the test always runs, and ensure it
still passes after applying the unconditional boxing change mentioned in the
surrounding comments (the test constructs Error::GrpcAPI from tonic::Status and
asserts status.code() and status.message()).
- Around line 11-14: The conditional type alias GrpcApiErrorPayload causes
divergent in-memory representations under clippy vs normal builds; make the
payload unconditionally boxed by changing the alias to "type GrpcApiErrorPayload
= Box<tonic::Status>;" so Error::GrpcAPI has a consistent, smaller enum variant
across all builds, then remove the #[cfg(not(clippy))] gating from tests that
construct Error::GrpcAPI (the test that conditionally constructs GrpcAPI can now
use Error::GrpcAPI(status) directly) and consider removing the now-redundant
#[allow(clippy::large_enum_variant)] if no longer needed.
0a5504c to
98a9dcb
Compare
98a9dcb to
affc0d5
Compare
Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
affc0d5 to
d63fe2b
Compare
…-version-1-93 Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
162c150 to
7afa393
Compare
…m impl The manual `impl From<tonic::Status>` duplicated what `#[from]` already generates, so the variant change and impl were a no-op (identical behavior, same clippy result). Reverts to `#[from]` per review and drops the trivial conversion tests added alongside it. Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
…ail_point The 1.93 bump trips clippy::result_large_err on the integration-test crates (large Error type), matching the existing allows in lib.rs and examples; and unused_mut on the fail_point! closure binding, which is mutated only when failpoints are compiled in. Closes the gap that left make check red since 2026-06-14. Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
Summary
This PR upgrades the repository toolchain/MSRV to Rust
1.93.0and applies strict-clippy compatibility fixes while preserving runtime behavior and public API compatibility.Quality objective:
-D warnings,Error::GrpcAPIusability for downstream code.Rationale
Problem statement
Moving to Rust 1.93 and strict clippy surfaced new lints in generated/protocol and request/transaction paths. A prior approach introduced awkward conditional typing for
Error::GrpcAPI; this PR keeps the API representation stable and solves lint pressure in a clearer way.Design changes
Cargo.toml:rust-version = "1.93.0"rust-toolchain.toml: channel1.93.0Error::GrpcAPIcompatibility:tonic::Status(single representation),From<tonic::Status> for Errorconversion path,cfg(clippy)payload-type split.#![allow(clippy::result_large_err)]insrc/lib.rsandexamples/raw.rs.repeat(...).take(...)withrepeat_n(...),src/proto.rs.Risk analysis
File Scope
Cargo.tomlrust-toolchain.tomlsrc/common/errors.rssrc/lib.rsexamples/raw.rssrc/proto.rssrc/pd/retry.rssrc/store/request.rssrc/transaction/requests.rssrc/transaction/transaction.rstests/integration_tests.rsTesting Done
Executed locally:
cargo fmt-> passcargo clippy --all-targets --all-features -- -D warnings-> passcargo test-> passAdded/maintained regression coverage in
src/common/errors.rs:from_tonic_status_produces_grpc_api_errorgrpc_api_variant_accepts_tonic_status_payloadfrom_proto_region_error_wraps_region_errorfrom_proto_key_error_wraps_key_errorCompatibility
Error::GrpcAPIconstruction/pattern behavior remains compatible (tonic::Statuspayload).Summary by CodeRabbit
Chores
Improvements
Tests