-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Create new lints with #[clippy::version = "dev"]
#14299
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
base: master
Are you sure you want to change the base?
Conversation
|
(Long text about a problem where I think I came up with a solution while spelling it out. Jump to the last paragraph, if you only want to know the solution) This is a bit awkward for beta/stable branching (what triggers the doc generation): To get the beta commit of Clippy, I check which commit of Clippy is in the beta branch in the Rust repo. This commit is always the commit of the sync 2 weeks before the release. That commit would contain the So to fix that, we (the person doing the syncs) would have to do an extra version replacement during the sync 2 weeks before the release. Or maybe doing so before every sync would be even better. If this needs to be done during sync, we need to automate it with a However checking this in CI is tricky. We could check in the While writing this, we could also get around this: Add a test to |
a66f49a to
0190457
Compare
|
That sounds good, here's an example output |
0190457 to
782a868
Compare
782a868 to
e7781b4
Compare
This comment has been minimized.
This comment has been minimized.
e7781b4 to
ea71df3
Compare
|
Great @Alexendoo! I went through the last few versions to check for further version errors and found around 10 in total, so this PR is really needed if the versions are meant to be correct and not just rough indications with a margin of +/- 2. |
This comment has been minimized.
This comment has been minimized.
f23cdb2 to
aa592a9
Compare
This comment has been minimized.
This comment has been minimized.
|
Ping @flip1995 and @Alexendoo as a reminder that this exists. |
aa592a9 to
9b02ff9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Why are you removing the versions from renames? That's still useful for when those get added to the lints page. |
|
The rename versions are not displayed anywhere including the lints page, almost all of them leave it blank |
9b02ff9 to
f5a550e
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
f5a550e to
b0f8a7b
Compare
| The version shown should match the version of the release the changelog is | ||
| written for. If not, update the version to the changelog version. | ||
|
|
||
| Newly created lints will have `#[clippy::version = "nightly"]` and be handled |
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.
Nit: "dev" could be more appropriate, as code merged into the Clippy repository doesn't end up immediately into the next "nightly" release as distributed through rustup. I'm afraid using "nightly" could lead to reports that the lint isn't available in nightly, whereas "dev" makes it clearer that it may or may not be present.
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.
And right after this comment, I open this Zulip thread which makes my point.
b0f8a7b to
8b0f882
Compare
#[clippy::version = "nightly"]#[clippy::version = "dev"]
This is a partial solution to https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/Using.20CURRENT_RUSTC_VERSION.20in.20clippy.3A.3Aversion.3F
I was not sure if
CURRENT_RUSTC_VERSIONwould work for the stable/beta doc generation so there's no automation here, the versions still need to be manually corrected during the changelog update. But it will eventually (when we're past old PRs withverison = "1.xy.0") solve the issue of wrong versions being shown in the docsIf we figure out that
CURRENT_RUSTC_VERSIONcan be made to work it would be easy enough to move to alsor? @flip1995
cc @xFrednet
changelog: none