Skip to content

[Rust] Clarify MSRV and Clippy policy #9238

Open

Description

@avalon1k

While looking at the Rust crates, I noticed that their Rust-version declarations and Clippy coverage differ.

flatbuffers: rust-version = "1.51"
flexbuffers: no rust-version
flatbuffers-reflection: no rust-version, edition = "2021"

I also found the earlier MSRV discussion in #5812 and the Rust change-policy discussion in #6718, which appear to describe a policy of supporting roughly the two most recent stable Rust releases. I'm not sure how that policy relates to the current rust-version = "1.51" or other crates.

With Rust 1.98.1 and Clippy 0.1.98 I currently see:

flatbuffers: 14 Clippy warnings
flexbuffers: 55 Clippy warnings
reflection: 59 Clippy warnings
rust-analyzer also reports 21 warnings in reflection

I also noticed that tests/RustTest.sh runs cargo clippy from tests/rust_usage_test. That crate has path dependencies on flatbuffers and flexbuffers, so this appears to provide Clippy coverage for those crates. However, the command does not use -D warnings, so the "No Cargo clippy lints test" step succeeds even when Clippy emits warnings.

reflection is not a dependency of rust_usage_test, so it does not appear to be covered by that Clippy run.

Could maintainers clarify the intended policy here?

  1. What is the current MSRV for the Rust crates, and should all three crates declare rust-version?
  2. Is handwritten Rust code expected to be warning/Clippy-clean?
  3. Is the existing "No Cargo clippy lints test" intended to enforce zero Clippy warnings?

I'd like to confirm the intended policy before making cleanup or CI changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions