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

Fix formatting command #135035

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Fix formatting command #135035

merged 1 commit into from
Jan 2, 2025

Conversation

Noratrieb
Copy link
Member

The formatting command previously had two issues:

  • if rustfmt failed, it would print the command invocation. this is unnecessarily noisy
  • there was a race condition that lead to orphan rustfmts that would print their output after bootstrap exited

We fix this by

  • removing the printing, it's not really useful
  • threading failure through properly instead of just yoloing exit(1)

The formatting command previously had two issues:
- if rustfmt failed, it would print the command invocation. this is
  unnecessarily noisy
- there was a race condition that lead to orphan rustfmts that would
  print their output after bootstrap exited

We fix this by
- removing the printing, it's not really useful
- threading failure through properly instead of just yoloing exit(1)
@rustbot
Copy link
Collaborator

rustbot commented Jan 2, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 2, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks!

@jieyouxu
Copy link
Member

jieyouxu commented Jan 2, 2025

r=me after PR CI is slightly green

@jieyouxu jieyouxu assigned jieyouxu and unassigned Mark-Simulacrum Jan 2, 2025
@Noratrieb
Copy link
Member Author

mingw-check-tidy passed
@bors r=jieyouxu

@bors
Copy link
Contributor

bors commented Jan 2, 2025

📌 Commit 8b73fc5 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 2, 2025
}
}

if children.len() >= max_processes {
// Await oldest child.
children.pop_front().unwrap()(true);
match children.pop_front().unwrap()(true) {
RustfmtStatus::InProgress | RustfmtStatus::Ok => {}
Copy link
Member

Choose a reason for hiding this comment

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

InProgress should be unreachable when passing block: true

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 2, 2025
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#135016 (Ping me for rustc-dev-guide subtree changes on this repo)
 - rust-lang#135027 (Remove range-metadata amdgpu workaround)
 - rust-lang#135029 (Update mailmap)
 - rust-lang#135033 (try to dedup me in the mailmap)
 - rust-lang#135035 (Fix formatting command)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 666794e into rust-lang:master Jan 2, 2025
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 2, 2025
Rollup merge of rust-lang#135035 - Noratrieb:fixfmt, r=jieyouxu

Fix formatting command

The formatting command previously had two issues:
- if rustfmt failed, it would print the command invocation. this is unnecessarily noisy
- there was a race condition that lead to orphan rustfmts that would print their output after bootstrap exited

We fix this by
- removing the printing, it's not really useful
- threading failure through properly instead of just yoloing exit(1)
@rustbot rustbot added this to the 1.85.0 milestone Jan 2, 2025
@Noratrieb Noratrieb deleted the fixfmt branch January 2, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants