Replace NEXT_RUFF_VERSION with rooster in releases#22732
Merged
Conversation
Summary -- This PR updates our rooster config to replace `NEXT_RUFF_VERSION` with the new version when doing releases. This will be helpful for the `preview_since` entries (and even others like `stable_since`) in the `violation_metadata` macro, which we currently update manually. Test Plan -- The first commit is the entirety of the rooster config change. The second commit modifies an existing rule to use the `NEXT_RUFF_VERSION` field, and then the third commit shows the result of a `./scripts/release.sh` run that successfully updates the rule metadata. The fourth commit reverts the mock release.
Typing conformance resultsNo changes detected ✅ |
|
|
amyreese
approved these changes
Jan 19, 2026
MichaReiser
approved these changes
Jan 20, 2026
| } | ||
|
|
||
| fn parse_version(meta: &ParseNestedMeta) -> syn::Result<LitStr> { | ||
| /// Match either a semantic version with an optional `v` prefix (`v1.2.3`, `0.12.34`) or the |
Member
There was a problem hiding this comment.
What's the reason that we allow the v prefix? Can't we standardize around one format?
Contributor
Author
There was a problem hiding this comment.
All of our versions before 0.5.0 have a v prefix, so this was just to allow those. I narrowed this a bit more to allow the v only for v0.[0-4].\d+.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates our rooster config to replace
NEXT_RUFF_VERSIONwith the newversion when doing releases. This will be helpful for the
preview_sinceentries (and even others like
stable_since) in theviolation_metadatamacro,which we currently update manually.
This is the variable name that we discussed briefly on Discord, but something shorter might be nice too?
I guess we may also want a check somewhere that there's not a typo preventing the version from ever being updated?I went ahead and added this validation to the macro.
Test Plan
The first commit is the entirety of the rooster config change. The second commit
modifies an existing rule to use the
NEXT_RUFF_VERSIONfield, and then thethird commit shows the result of a
./scripts/release.shrun that successfullyupdates the rule metadata. The fourth commit reverts the test release.