-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
hawkw
requested changes
Apr 21, 2023
hawkw
approved these changes
Apr 21, 2023
There was a problem hiding this 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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Rust 1.69.0, the
almost_swapped
lint was enhanced and now triggerson the clap 3.x
Subcommand
derive macro. Unfortunately the macroincludes
#[deny(clippy::correctness)]
(which implies denyingalmost_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.