Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x fmt formats way too many files #131324

Closed
saethlin opened this issue Oct 6, 2024 · 4 comments
Closed

x fmt formats way too many files #131324

saethlin opened this issue Oct 6, 2024 · 4 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@saethlin
Copy link
Member

saethlin commented Oct 6, 2024

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.

@saethlin saethlin added the C-bug Category: This is a bug. label Oct 6, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 6, 2024
@saethlin saethlin added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 6, 2024
@bjorn3
Copy link
Member

bjorn3 commented Oct 6, 2024

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?

@onur-ozkan
Copy link
Member

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.

@saethlin
Copy link
Member Author

saethlin commented Oct 6, 2024

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

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 7, 2024
Rollup merge of rust-lang#131331 - onur-ozkan:131296, r=Kobzol

Revert "warn_old_master_branch" check

See rust-lang#131296 (comment).

Reverts rust-lang#130121 and rust-lang#129584.

Fixes rust-lang#131296 and rust-lang#131324.
@clubby789
Copy link
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
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

5 participants