Skip to content

chore: Use fixed Rust version for clippy (and fmt) #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 21, 2023
Merged

chore: Use fixed Rust version for clippy (and fmt) #413

merged 2 commits into from
Apr 21, 2023

Conversation

hds
Copy link
Collaborator

@hds hds commented Apr 21, 2023

In Rust 1.69.0, the almost_swapped lint was enhanced and now triggers
on the clap 3.x Subcommand derive macro. Unfortunately the macro
includes #[deny(clippy::correctness)] (which implies denying
almost_swapped), and so it can't be overridden.

This issue doesn't exist in clap 4.x, it was fixed already.

Until either the fix is backported to clap 3.x or we switch to clap
4.x., this change fixes the Rust version used for clippy (and by
extension fmt) to the previous version 1.68.2.

@hds hds requested a review from a team as a code owner April 21, 2023 14:35
In Rust 1.69.0, the `almost_swapped` lint was enhanced and now triggers
on the clap 3.x `Subcommand` derive macro. Unfortunately the macro
includes `#[deny(clippy::correctness)]` (which implies denying
`almost_swapped`), and so it can't be overridden.

This issue doesn't exist in clap 4.x, it was fixed already.

Until either the fix is backported to clap 3.x or we switch to clap
4.x., this change fixes the Rust version used for clippy (and by
extension rustfmt) to the previous version 1.68.2.
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

looks good to me assuming CI passes!

i'd like to finish the clap 3 -> clap 4 update eventually...

@hawkw hawkw enabled auto-merge (squash) April 21, 2023 17:31
@hawkw hawkw merged commit 36839de into tokio-rs:main Apr 21, 2023
hawkw pushed a commit that referenced this pull request May 8, 2023
The enhanced `clippy::almost_swapped` lint which shipped in Rust 1.69.0
was triggering in some cases where we derive `clap::Subcommand`. It
wasn't possible to allow it, because a deny on `clippy::correctness`
(which implies `clippy::almost_swapped`) was present in the generated
code.

As a result, we had to fix the version of Rust used for Clippy to
1.68.2.

In clap_derive (included in clap) 3.2.25, the deny on `clippy::correctness`
has been removed and an allow for `clippy::almost_swapped` has beed
added. Fixing the forced clippy error.

This change updates clap to the latest 3.x version, including
clap_derive and clap_lex.

It also reverts the change made in #413, so we will go back to using
the latest version of Rust for `clippy` and `fmt`.
hawkw added a commit that referenced this pull request Sep 29, 2023
In Rust 1.69.0, the `almost_swapped` lint was enhanced and now triggers
on the clap 3.x `Subcommand` derive macro. Unfortunately the macro
includes `#[deny(clippy::correctness)]` (which implies denying
`almost_swapped`), and so it can't be overridden.

This issue doesn't exist in clap 4.x, it was fixed already.

Until either the fix is backported to clap 3.x or we switch to clap
4.x., this change fixes the Rust version used for clippy (and by
extension rustfmt) to the previous version 1.68.2.

Co-authored-by: Eliza Weisman <[email protected]>
hawkw pushed a commit that referenced this pull request Sep 29, 2023
The enhanced `clippy::almost_swapped` lint which shipped in Rust 1.69.0
was triggering in some cases where we derive `clap::Subcommand`. It
wasn't possible to allow it, because a deny on `clippy::correctness`
(which implies `clippy::almost_swapped`) was present in the generated
code.

As a result, we had to fix the version of Rust used for Clippy to
1.68.2.

In clap_derive (included in clap) 3.2.25, the deny on `clippy::correctness`
has been removed and an allow for `clippy::almost_swapped` has beed
added. Fixing the forced clippy error.

This change updates clap to the latest 3.x version, including
clap_derive and clap_lex.

It also reverts the change made in #413, so we will go back to using
the latest version of Rust for `clippy` and `fmt`.
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