From 44d7bd4ecb0c1703cc523905660c027cde879559 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Fri, 26 May 2023 15:14:32 +0900 Subject: [PATCH 1/3] Explain use of nightly clippy over whole monorepo ref: https://github.com/rust-lang/rust/issues/66287 --- ci/test-checks.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/test-checks.sh b/ci/test-checks.sh index 817ce990d48bdf..5f6398b4881c52 100755 --- a/ci/test-checks.sh +++ b/ci/test-checks.sh @@ -77,7 +77,12 @@ _ ci/order-crates-for-publishing.py nightly_clippy_allows=(--allow=clippy::redundant_clone) -# run nightly clippy for `sdk/` as there's a moderate amount of nightly-only code there +# use nightly clippy as frozen-abi proc-macro generates a lot of code across +# various crates in this whole mono-repo. Likewise, frozen-abi(-macro) crates' +# unit tests are only compiled under nightly. +# similarly nightly is desired to run clippy over all of bench files because +# the bench itself isn't stabilized yet... +# ref: https://github.com/rust-lang/rust/issues/66287 _ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" clippy --workspace --all-targets --features dummy-for-ci-check -- \ --deny=warnings \ --deny=clippy::default_trait_access \ From d28f2dbbc4f6cd85426f7808f32a3e0f795799fa Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Fri, 26 May 2023 15:43:59 +0900 Subject: [PATCH 2/3] Fix typo and update link in test-checks.sh --- ci/test-checks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/test-checks.sh b/ci/test-checks.sh index 5f6398b4881c52..20ba912353197b 100755 --- a/ci/test-checks.sh +++ b/ci/test-checks.sh @@ -78,7 +78,7 @@ _ ci/order-crates-for-publishing.py nightly_clippy_allows=(--allow=clippy::redundant_clone) # use nightly clippy as frozen-abi proc-macro generates a lot of code across -# various crates in this whole mono-repo. Likewise, frozen-abi(-macro) crates' +# various crates in this whole monorepo. Likewise, frozen-abi(-macro) crates' # unit tests are only compiled under nightly. # similarly nightly is desired to run clippy over all of bench files because # the bench itself isn't stabilized yet... @@ -92,7 +92,7 @@ _ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" clippy --workspace - # temporarily run stable clippy as well to scan the codebase for # `redundant_clone`s, which is disabled as nightly clippy is buggy: -# https://github.com/rust-lang/rust-clippy/issues/10577 +# https://github.com/solana-labs/solana/issues/31834 # # can't use --all-targets: # error[E0554]: `#![feature]` may not be used on the stable release channel From dda0127a62c6c55c14d4b0bd27bbb0449aa85121 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Fri, 26 May 2023 15:53:03 +0900 Subject: [PATCH 3/3] Incorporate review suggestions --- ci/test-checks.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ci/test-checks.sh b/ci/test-checks.sh index 20ba912353197b..bbd66f0f2e98d9 100755 --- a/ci/test-checks.sh +++ b/ci/test-checks.sh @@ -77,10 +77,11 @@ _ ci/order-crates-for-publishing.py nightly_clippy_allows=(--allow=clippy::redundant_clone) -# use nightly clippy as frozen-abi proc-macro generates a lot of code across -# various crates in this whole monorepo. Likewise, frozen-abi(-macro) crates' +# Use nightly clippy, as frozen-abi proc-macro generates a lot of code across +# various crates in this whole monorepo (frozen-abi is enabled only under nightly +# due to the use of unstable rust feature). Likewise, frozen-abi(-macro) crates' # unit tests are only compiled under nightly. -# similarly nightly is desired to run clippy over all of bench files because +# Similarly, nightly is desired to run clippy over all of bench files because # the bench itself isn't stabilized yet... # ref: https://github.com/rust-lang/rust/issues/66287 _ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" clippy --workspace --all-targets --features dummy-for-ci-check -- \