Skip to content

x fmt formats way too many files #131324

Closed
Closed

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.

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Oct 6, 2024
  2. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Oct 6, 2024
  3. bjorn3 commented on Oct 6, 2024

    @bjorn3
    Member

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

    Don't we check formatting of all files in CI anyway?

  4. onur-ozkan commented on Oct 6, 2024

    @onur-ozkan
    Contributor

    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.

    Most likely.

    Don't we check formatting of all files in CI anyway?

    On CI, yes.

  5. saethlin commented on Oct 6, 2024

    @saethlin
    MemberAuthor

    Interesting. I swear I've seen spurious formatting changes in PRs. Might be some other effect.

  6. added a commit that references this issue on Oct 7, 2024
  7. added a commit that references this issue on Oct 7, 2024
  8. clubby789 commented on Oct 7, 2024

    @clubby789
    Contributor

    Should be closed by #131331 (GH didn't pick up the comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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