Skip to content

feature: Allow user's to set the release channel when running the diff check - #7080

Merged
jieyouxu merged 2 commits into
rust-lang:mainfrom
ytmimi:cfg_release_channel_on_diff_check
Aug 28, 2026
Merged

feature: Allow user's to set the release channel when running the diff check#7080
jieyouxu merged 2 commits into
rust-lang:mainfrom
ytmimi:cfg_release_channel_on_diff_check

Conversation

@ytmimi

@ytmimi ytmimi commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

The diff check failed on the latest subtree push (#7079) because of cfg_select! formatting that was implemented in r-l/r (rust-lang/rust#154202) even though we gated cfg_select! formatting on the nightly release channel (rust-lang/rust#160998). In theory the diff-check should have succeeded because r-l/rustfmt didn't have its own cfg_select! formatting implementation yet.

What I realized is that we're not setting CFG_RELEASE_CHANNEL so rustfmt defaults to the nightly release channel. with these changes we'll have more control over the release channel and we'll default CFG_RELEASE_CHANNEL=stable since the primary goal of the Diff Check is to ensure we're not breaking stable formatting.

@rustbot rustbot added A-CI Area: CI S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Aug 28, 2026
ytmimi added 2 commits August 28, 2026 00:10
Now we can configure which release channel the compiled rustfmt should target.
Because `CFG_RELEASE_CHANNEL` wasn't getting set before we'd default to the
`nightly` channel. For the most part that's not really an issue, but because
we're using the diff check to ensure that we're not changing stable formatting
it's more appropriate to default builds to the `stable` release channel.
…_diff.yml

The `release_channel` defaults to `stable`, but it might be nice in some cases
to test different release channels.
@ytmimi
ytmimi force-pushed the cfg_release_channel_on_diff_check branch from ba3031d to 7376a6a Compare August 28, 2026 04:10
@jieyouxu jieyouxu self-assigned this Aug 28, 2026

@jieyouxu jieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, this definitely makes sense

View changes since this review

@jieyouxu
jieyouxu added this pull request to the merge queue Aug 28, 2026
Merged via the queue into rust-lang:main with commit cac88c1 Aug 28, 2026
27 checks passed
@rustbot rustbot added release-notes Needs an associated changelog entry and removed S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI release-notes Needs an associated changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants