Skip to content

CI: check that new lints use the correct stabilization version #13507

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

Closed

Conversation

samueltardieu
Copy link
Contributor

New lints are found by comparing the metadata with the base one. The declared version must be equal to the stabilization version.

Inspired by #13497.

changelog: none

New lints are found by comparing the metadata with the base one. The
declared version must be equal to the stabilization version.
@rustbot
Copy link
Collaborator

rustbot commented Oct 5, 2024

r? @flip1995

rustbot has assigned @flip1995.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 5, 2024
@alex-semenyuk
Copy link
Member

Might make sense to add tests on this stuff

@xFrednet
Copy link
Member

xFrednet commented Oct 6, 2024

I think a solution that doesn't fail the CI would be preferable instead. Something like a temporary value that is replaced during the release process. I believe @blyxyas was looking into something like that for a while. But I'm not sure.

Otherwise, I'm also used to updating these attributes as part of the release process.

@samueltardieu
Copy link
Contributor Author

I think a solution that doesn't fail the CI would be preferable instead.

I'm not sure I understand why failing the CI would be wrong. Having the right version from the start (and having to update it if there is a release before it is merged in) ensures that the documentation is up-to-date, and let the user see what is in stable, beta, or nightly for example.

Something like a temporary value that is replaced during the release process. I believe @blyxyas was looking into something like that for a while. But I'm not sure.

This temporary value would mean "unreleased"? Maybe something like version 0.0.0, or 99.99.99 could be used for this this indeed (and be checked against during the release).

Otherwise, I'm also used to updating these attributes as part of the release process.

Is that done manually? If this is the case, maybe this code could be used to automate the check during the release process, by checking new lints (unless this is done already by some other script).

@y21
Copy link
Member

y21 commented Oct 6, 2024

We can still end up with wrong versions if a beta cutoff happens after the PR is merged but before the next clippy->rust sync happens, right? So we would still need to go through all lints and correct/verify the attribute every version anyway.

You might be interested in the discussion on zulip:
https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Using.20CURRENT_RUSTC_VERSION.20in.20clippy.3A.3Aversion.3F

The CURRENT_RUSTC_VERSION temporary value was brought up here which is already being used by the rust-lang/rust repo and is already automatically replaced, so it wouldn't be much extra work from the release team's point of view.

@samueltardieu
Copy link
Contributor Author

Right. Thanks for the pointer to the zulip discussion.

I'll close this PR.

@samueltardieu samueltardieu deleted the new-lint-version-check branch January 13, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants