-
Notifications
You must be signed in to change notification settings - Fork 119
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
fix: update MSRV references and clippy lints #1671
Conversation
3269200
to
9ab9afd
Compare
* Cargo.toml msrv specifications should match rust toolchain * derive_hash clippy lint naming update * fix deprecated openssl builder function
9ab9afd
to
1d5e17f
Compare
@@ -18,7 +18,7 @@ pub const LEN: usize = 128 / 8; | |||
// The implemented PartialEq will have the same results as | |||
// a derived version, except it is constant-time. Therefore | |||
// Hash can still be derived. | |||
#[allow(clippy::derive_hash_xor_eq)] |
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.
What if you did something like:
#[allow(unknown_lints, clippy::derive_hash_xor_eq, clippy::derived_hash_with_manual_eq)]
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.
Just tested it and that does allow us to continue using clippy 1.63. It's not super pretty, but probably better than making backwards incompatible clippy changes?
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.
Actually, I'm not sure what I missed when testing locally, but clippy still warns about the old name, (because it does recognize it) and then we error out on that.
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.
seems that trick used to work:
s2n-quic/common/s2n-codec/src/decoder/value.rs
Lines 104 to 109 in aec1ff9
// clippy changed its lint name so use both for backwards compatibility | |
#[allow( | |
clippy::unknown_clippy_lints, | |
clippy::useless_conversion, | |
clippy::identity_conversion | |
)] |
but they deprecated
clippy::unknown_clippy_lints
so I guess no longer
This reverts commit 4ffe886.
Description of changes:
This PR is primarily cut to fix clippys warnings (that are transformed into an error by
-D warnings
) in our CI run of clippy.the
hash_xor_partial_equal
lint was renamed toderived_hash_with_manual_eq
. Note that allowingderived_hash_with_manual_eq
is a backwards incompatible change for clippy. E.g. you will no longer be able to run clippy on the MSRV version. The alternative is switching our CI clippy runs to either use the MSRV or no longer treat all warnings as errors.Clippy also introduced a new complaint in stable (1.68) which is the manually derived Default on enums. This PR updates code to comply with that lint.
It also updates netbench MSRV to 1.62. Since netbench consumes quic and quic has an MSRV of 1.63, it couldn't actually be built with 1.62 anyways.
Call-outs:
We specify a patch version dependency for OpenSSL in netbench because the
build
function was deprecated in 010.46, but thebuild2
function didn't exist before 0.10.46. So if we use the build function, then we require at least0.10.46
to build.It does not fix the
derived_hash_with_manual_eq
naming error, because that lint wasn't available until 1.68. Ideally the clippy MSRV configuration would take care of that for us, but that does not appear to be the case.Testing:
CI run should pass successfully.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.