Skip to content

Conversation

@jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Dec 7, 2025

Caution

Stacked on top of #6741.

So that when manually dispatching the Diff Check workflow, an explicit style edition is specified.

Note that the style edition specified with style_edition input can still be overridden by rustfmt_configs, but the intention is to make sure the style_edition is always specified.

Context: #6681 (comment)

Style edition via --style-edition=$STYLE_EDITION vs --config=style_edition=$STYLE_EDITION

See discussion in #t-rustfmt > style edition flag vs config.

In this PR I use the --config=style_edition=$STYLE_EDITION form, because I'm not actually sure what's the precedence order of mixed invocations (example below), so I just used --config=style_edition=$STYLE_EDITION where later style_editions specified in optional rustfmt_configs should take precedence over this input.

$ rustfmt --style-edition=2024 --config=style_edition=2021
$ rustfmt --config=style_edition=2021 --style-edition=2024

Review remarks

The first commit in this PR is a drive-by fix for rusfmt -> rustfmt that was bothering me, should not contain any functional changes.

The second commit is the actual script/workflow change.

To make it easier to figure out what inputs a Diff Check workflow was
invoked with.

The log uses a GHA log group to make it easier to find.
No functional changes. Just was bothering me :D
So that when manually dispatching the Diff Check workflow, an explicit
style edition is specified.

Note that the style edition specified with `style_edition` input can
still be overridden by `rustfmt_configs`, but the intention is to make
sure the `style_edition` is always specified.
@jieyouxu jieyouxu added the A-CI Area: CI label Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant