Skip to content
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

Explain use of nightly clippy over whole monorepo #31833

Merged
merged 3 commits into from
May 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ci/test-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Member 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

# 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
Member 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!

_ 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 \
Expand Down