Skip to content

Conversation

onur-ozkan
Copy link
Contributor

@onur-ozkan onur-ozkan commented May 7, 2025

Currently, there is no way to run in-tree rustfmt using x fmt or x test tidy commands. This PR implements rustfmt on x run, which allows bootstrap to run the in-tree rustfmt.

Fixes #140723

@rustbot
Copy link
Collaborator

rustbot commented May 7, 2025

r? @Kobzol

rustbot has assigned @Kobzol.
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 May 7, 2025
@onur-ozkan onur-ozkan force-pushed the use-in-tree-rustfmt branch 2 times, most recently from 87d477b to 0238706 Compare May 7, 2025 08:58
@onur-ozkan onur-ozkan force-pushed the use-in-tree-rustfmt branch 2 times, most recently from 9773a4a to 3eaff61 Compare May 7, 2025 20:33
@onur-ozkan onur-ozkan changed the title use in-tree rustfmt if stage > 0 or precompiled one is unavailable make it possible to run in-tree rustfmt with x run rustfmt May 7, 2025
@onur-ozkan onur-ozkan added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 7, 2025
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the use-in-tree-rustfmt branch from 3eaff61 to 45df91e Compare May 7, 2025 20:39
@onur-ozkan
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 7, 2025
@onur-ozkan onur-ozkan force-pushed the use-in-tree-rustfmt branch from 45df91e to 763876e Compare May 8, 2025 07:16
onur-ozkan added 2 commits May 8, 2025 10:18
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the use-in-tree-rustfmt branch from 763876e to e85d014 Compare May 8, 2025 07:18
@Kobzol
Copy link
Member

Kobzol commented May 8, 2025

Looks great! You can r=me, unless you want to make further changes.

@onur-ozkan
Copy link
Contributor Author

I am not planning to make further change on this PR.

@bors r=Kobzol

@bors
Copy link
Collaborator

bors commented May 8, 2025

📌 Commit e85d014 has been approved by Kobzol

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 May 8, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 8, 2025
…Kobzol

make it possible to run in-tree rustfmt with `x run rustfmt`

Currently, there is no way to run in-tree `rustfmt` using `x fmt` or `x test tidy` commands. This PR implements `rustfmt` on `x run`, which allows bootstrap to run the in-tree `rustfmt`.

Fixes rust-lang#140723
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#140716 (Improve `-Zremap-path-scope` tests with dependency)
 - rust-lang#140732 (make it possible to run in-tree rustfmt with `x run rustfmt`)
 - rust-lang#140736 (trait selection: check `&` before suggest remove deref)
 - rust-lang#140755 ([win][arm64] Disable various DebugInfo tests that don't work on Arm64 Windows)
 - rust-lang#140756 ([arm64] Pointer auth test should link with C static library statically)
 - rust-lang#140758 ([win][arm64] Disable MSVC Linker 'Arm Hazard' warning)
 - rust-lang#140759 ([win][arm64] Disable std::fs tests that require symlinks)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented May 8, 2025

⌛ Testing commit e85d014 with merge e964cca...

@bors
Copy link
Collaborator

bors commented May 8, 2025

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing e964cca to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 8, 2025
@bors bors merged commit e964cca into rust-lang:master May 8, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone May 8, 2025
@onur-ozkan onur-ozkan deleted the use-in-tree-rustfmt branch May 8, 2025 15:09
Copy link
Contributor

github-actions bot commented May 8, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 1973872 (parent) -> e964cca (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard e964ccafedcf7a505f90f31370d568e649286176 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 4586.5s -> 6125.7s (33.6%)
  2. dist-x86_64-apple: 7162.9s -> 8945.0s (24.9%)
  3. dist-aarch64-apple: 5462.2s -> 6267.0s (14.7%)
  4. dist-apple-various: 6861.8s -> 7813.1s (13.9%)
  5. aarch64-apple: 4166.3s -> 4520.0s (8.5%)
  6. x86_64-msvc-ext1: 7281.7s -> 7829.3s (7.5%)
  7. dist-powerpc-linux: 5600.7s -> 5248.2s (-6.3%)
  8. x86_64-gnu-aux: 6420.5s -> 6062.5s (-5.6%)
  9. x86_64-gnu-debug: 6101.4s -> 6441.0s (5.6%)
  10. dist-ohos: 10626.8s -> 11141.1s (4.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e964cca): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.2%, secondary 2.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
9.3% [9.3%, 9.3%] 1
Regressions ❌
(secondary)
5.3% [5.3%, 5.3%] 1
Improvements ✅
(primary)
-1.1% [-4.0%, -0.5%] 7
Improvements ✅
(secondary)
-0.6% [-0.6%, -0.6%] 1
All ❌✅ (primary) 0.2% [-4.0%, 9.3%] 8

Cycles

Results (primary 0.2%, secondary 2.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.6% [0.4%, 0.8%] 4
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-0.5%, 0.8%] 6

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 771.841s -> 772.853s (0.13%)
Artifact size: 365.34 MiB -> 365.33 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

./x.py fmt --stage 1 does not use stage 1 rustfmt
5 participants