Skip to content

x fmt formats way too many files #131324

Closed
Closed
@saethlin

Description

@saethlin

I am in this state (only 1 modified file):

╰ ➤ git diff --stat
 compiler/rustc_codegen_ssa/src/mir/mod.rs | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

But I just tried to format and got this:

╰ ➤ x fmt
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.03s
fmt: formatted 5608 modified files
Build completed successfully in 0:00:01

Something is quite wrong here. Formatting of only changed files must be correct, otherwise some files in the tree will get spurious formatting changes in PRs.

Perhaps #131296 is related? I have a vague memory of seeing this misbehavior occasionally in the past though I'm only now remembering to file an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions