Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Explain use of nightly clippy over whole monorepo #31833

Merged
merged 3 commits into from
May 26, 2023

Conversation

ryoqun
Copy link
Contributor

@ryoqun ryoqun commented May 26, 2023

Add proper and updated explanation as to nightly clippy (#31692 (review)):

What's the argument for running nightly clippy everywhere, incidentally? The comment only refers to sdk. It would also be nice to document what nightly-only code we're actually using there.

... so that I can hide my real desire (hint: branch name) from public scrutiny. :)

ref: rust-lang/rust#66287

@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the ./sdk reference was arguably stale

as a matter of fact, this particular line is added at #8012 (comment) but frozen abi is moved out of ./sdk at #13008

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Sorry if my comment/suggestions don't show up properly. You pushed while I was reviewing and I'm too lazy to recreate them 😝

Comment on lines 80 to 85
# 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# 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
# 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'
# 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

Comment nits

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not clear from this comment why "frozen-abi proc-macro generating code" necessitates nightly clippy. Can you expand?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hehe, nice question. how about this?: dda0127

Copy link
Contributor

Choose a reason for hiding this comment

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

hehe, nice question. how about this?: dda0127

Much better, thank you!

@ryoqun ryoqun requested a review from CriesofCarrots May 26, 2023 06:53
@ryoqun
Copy link
Contributor Author

ryoqun commented May 26, 2023

Sorry if my comment/suggestions don't show up properly. You pushed while I was reviewing and I'm too lazy to recreate them stuck_out_tongue_closed_eyes

haha, what a expedited code reviewing service. thanks a lot :)

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Thank you!

@ryoqun ryoqun merged commit fc97b7d into solana-labs:master May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants