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

rustdoc: use a template to generate Hrefs #109616

Closed
wants to merge 1 commit into from

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Mar 25, 2023

Previously, href always returned a string, so each link incurred at least one allocation. We were also using "../".repeat(), and .collect() into strings to generate part of the paths. This abstracts away those repetitions into a couple of helper structs, ParentDirectories and PathComponents, and puts them together into an Href template, which should save some allocations. As a side benefit, I think it makes the logic of constructing links a little clearer.

This removes the only call sites for certain methods of UrlPartsBuilder, so it also removes those methods.

Also, remove the ItemType return value from href and friends; it was basically unused.

Part of #108868

@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2023

r? @notriddle

(rustbot has picked a reviewer for you, use r? to override)

@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2023

⚠️ Warning ⚠️

  • These commits modify submodules.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 25, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2023

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

@jsha jsha force-pushed the href-template branch 2 times, most recently from 3365c0c to fb5a92a Compare March 25, 2023 23:47
@jsha
Copy link
Contributor Author

jsha commented Mar 26, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 26, 2023
@bors
Copy link
Contributor

bors commented Mar 26, 2023

⌛ Trying commit fb5a92a9576a41666183124a42a066464ee53e78 with merge ec9ce33518e7a69ce272577490eb0cff0c04247c...

@bors
Copy link
Contributor

bors commented Mar 26, 2023

☀️ Try build successful - checks-actions
Build commit: ec9ce33518e7a69ce272577490eb0cff0c04247c (ec9ce33518e7a69ce272577490eb0cff0c04247c)

1 similar comment
@bors
Copy link
Contributor

bors commented Mar 26, 2023

☀️ Try build successful - checks-actions
Build commit: ec9ce33518e7a69ce272577490eb0cff0c04247c (ec9ce33518e7a69ce272577490eb0cff0c04247c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ec9ce33518e7a69ce272577490eb0cff0c04247c): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
5.5% [0.9%, 25.6%] 6
Regressions ❌
(secondary)
1.5% [1.5%, 1.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 5.5% [0.9%, 25.6%] 6

Max RSS (memory usage)

Results

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)
1.0% [0.9%, 1.2%] 4
Regressions ❌
(secondary)
4.7% [4.7%, 4.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [0.9%, 1.2%] 4

Cycles

Results

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)
26.4% [26.4%, 26.4%] 1
Regressions ❌
(secondary)
2.3% [2.2%, 2.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 26.4% [26.4%, 26.4%] 1

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 26, 2023
Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

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

Hmm, based on the perf results, it seems like using templates for this might not be worth it. I agree that the existing code is not great both for perf and readability reasons though.

I think what could potentially help on both fronts is collecting all the data for the href using structured types (rather than passing strings around). Then we could have a relatively simple formatting function that would take that data and generate the href. What do you think?

@jsha
Copy link
Contributor Author

jsha commented Mar 30, 2023

The structured types approach is pretty much what this PR does. The Href struct is:

struct Href<'a, P>
where
    P: fmt::Display,
{
    root: &'a str,
    parent_directories: ParentDirectories,
    path_components: P,
    filename_prefix: &'a str,
    filename_base: Cow<'a, str>,
    fragment: &'a str,
}

And in terms of performance of the templates, askama just generates a series of write! calls, which should be very performant indeed. I was quite surprised to see this PR made performance worse rather than better. I was particularly surprised to see how much worse it made preformance for the stm32f4 crate - 25%!

I've been trying to get rustc-perf benchmarking set up locally so I can test various hypotheses and see where the issue is. For instance in a few places I replaced url: String with url.to_string() (where url is now Display). I figured that couldn't make things slower because the old code was already allocating a string. However, the old code used UrlPartsBuilder (which preallocates an estimated capacity), while the new code is writing to a fresh, empty string. One of the notable places this happens is in handling intra-doc links, of which stm32f4 has a lot.

At any rate, I'm having trouble with rustc-perf right now because when I run the doc benchmarks locally, it fails to build stm32f4 (and several other crates), seemingly because of a build script that can't determine the rust version based on my local binary.

@rust-log-analyzer

This comment has been minimized.

@jsha jsha force-pushed the href-template branch 2 times, most recently from 44c43ae to 98c4065 Compare April 1, 2023 02:11
@rust-log-analyzer

This comment has been minimized.

@jsha
Copy link
Contributor Author

jsha commented Apr 1, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 1, 2023
@bors
Copy link
Contributor

bors commented Apr 1, 2023

⌛ Trying commit ecfcd356b45c366206b69a84b508fc72fa0d3661 with merge ee1012a52be4db4a2dcf676b195c25a83089aaa0...

@jsha
Copy link
Contributor Author

jsha commented Apr 5, 2023

(pushed an update to resolve a merge conflict. no substantive changes)

@notriddle
Copy link
Contributor

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Apr 5, 2023

📌 Commit ae1a1ef has been approved by notriddle

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 Apr 5, 2023
@bors
Copy link
Contributor

bors commented Apr 6, 2023

⌛ Testing commit ae1a1ef with merge db3c527cbfab37706414b16370b660c11c7ed6ae...

@bors
Copy link
Contributor

bors commented Apr 6, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 6, 2023
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2023-04-06T02:47:01Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T02:47:01Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-04-06T02:47:01Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpBnkFf2#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T02:47:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-04-06T02:47:03Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpBnkFf2#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpBnkFf2\\incremental-state"
[2023-04-06T02:47:06Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T02:47:06Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpBnkFf2#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpBnkFf2\\incremental-state"
[2023-04-06T02:47:07Z DEBUG collector::benchmark::patch] applying println to "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpBnkFf2"
[2023-04-06T02:47:07Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:47:07Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:47:07Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpBnkFf2#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpBnkFf2\\incremental-state"
[2023-04-06T02:47:08Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T02:47:09Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-04-06T02:47:09Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpMOrUGL#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T02:47:11Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-04-06T02:47:11Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-04-06T02:47:11Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpMOrUGL#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpMOrUGL\\incremental-state"
[2023-04-06T02:47:14Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T02:47:14Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpMOrUGL#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpMOrUGL\\incremental-state"
[2023-04-06T02:47:15Z DEBUG collector::benchmark::patch] applying println to "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpMOrUGL"
[2023-04-06T02:47:15Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:47:15Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:47:15Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpMOrUGL#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpMOrUGL\\incremental-state"
[2023-04-06T02:47:17Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T02:47:17Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-04-06T02:47:17Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpUNzAdL#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T02:47:19Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-04-06T02:47:19Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-04-06T02:47:19Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpUNzAdL#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpUNzAdL\\incremental-state"
[2023-04-06T02:47:22Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T02:47:22Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpUNzAdL#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpUNzAdL\\incremental-state"
[2023-04-06T02:47:23Z DEBUG collector::benchmark::patch] applying println to "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpUNzAdL"
[2023-04-06T02:47:23Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:47:23Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:47:23Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpUNzAdL#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpUNzAdL\\incremental-state"
Executing benchmark cargo-0.60.0 (2/8)
Preparing cargo-0.60.0
[2023-04-06T02:47:26Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
[2023-04-06T02:47:26Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None
---
[2023-04-06T02:52:00Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T02:52:03Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-04-06T02:52:03Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpmlvWgY#[email protected]" "--lib" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T02:53:01Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-04-06T02:53:01Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpmlvWgY#[email protected]" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpmlvWgY\\incremental-state"
[2023-04-06T02:54:09Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T02:54:09Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpmlvWgY#[email protected]" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpmlvWgY\\incremental-state"
[2023-04-06T02:54:21Z DEBUG collector::benchmark::patch] applying println to "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpmlvWgY"
[2023-04-06T02:54:21Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:54:21Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:54:21Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpmlvWgY#[email protected]" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpmlvWgY\\incremental-state"
[2023-04-06T02:54:36Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T02:54:39Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-04-06T02:54:39Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpLOr2Nq#[email protected]" "--release" "--lib" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T02:56:11Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-04-06T02:56:11Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-04-06T02:56:11Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpLOr2Nq#[email protected]" "--release" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpLOr2Nq\\incremental-state"
[2023-04-06T02:57:51Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T02:57:51Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpLOr2Nq#[email protected]" "--release" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpLOr2Nq\\incremental-state"
[2023-04-06T02:58:03Z DEBUG collector::benchmark::patch] applying println to "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpLOr2Nq"
[2023-04-06T02:58:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:58:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-04-06T02:58:03Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpLOr2Nq#[email protected]" "--release" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpLOr2Nq\\incremental-state"
Executing benchmark ctfe-stress-5 (3/8)
Preparing ctfe-stress-5
[2023-04-06T02:58:20Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
[2023-04-06T02:58:20Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None
---
[2023-04-06T02:58:21Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T02:58:21Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-04-06T02:58:21Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpKzJSnD#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T02:58:28Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-04-06T02:58:28Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpKzJSnD#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpKzJSnD\\incremental-state"
[2023-04-06T02:58:38Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T02:58:38Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpKzJSnD#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpKzJSnD\\incremental-state"
[2023-04-06T02:58:38Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T02:58:38Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-04-06T02:58:38Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpY7vNnB#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T02:58:46Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-04-06T02:58:46Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-04-06T02:58:46Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpY7vNnB#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpY7vNnB\\incremental-state"
[2023-04-06T02:58:55Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T02:58:55Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpY7vNnB#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpY7vNnB\\incremental-state"
[2023-04-06T02:58:56Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T02:58:56Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-04-06T02:58:56Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpzX1z4n#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T02:59:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
---
[2023-04-06T03:02:09Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T03:02:09Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-04-06T03:02:09Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpERDCX9#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T03:02:10Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-04-06T03:02:10Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpERDCX9#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpERDCX9\\incremental-state"
[2023-04-06T03:02:11Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T03:02:11Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpERDCX9#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpERDCX9\\incremental-state"
Executing benchmark match-stress (6/8)
Preparing match-stress
[2023-04-06T03:02:12Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
[2023-04-06T03:02:12Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None
---
[2023-04-06T03:02:13Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T03:02:13Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-04-06T03:02:13Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpo6hKZV#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T03:02:15Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-04-06T03:02:15Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpo6hKZV#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpo6hKZV\\incremental-state"
[2023-04-06T03:02:18Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T03:02:18Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpo6hKZV#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpo6hKZV\\incremental-state"
[2023-04-06T03:02:20Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T03:02:20Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-04-06T03:02:20Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpr1WH0U#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T03:02:22Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
---
[2023-04-06T03:02:35Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T03:02:35Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-04-06T03:02:35Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpDzYuzG#[email protected]" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T03:02:36Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-04-06T03:02:36Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpDzYuzG#[email protected]" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpDzYuzG\\incremental-state"
[2023-04-06T03:02:36Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T03:02:36Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpDzYuzG#[email protected]" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpDzYuzG\\incremental-state"
[2023-04-06T03:02:36Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T03:02:36Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-04-06T03:02:36Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpqIP8IU#[email protected]" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T03:02:37Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
---
[2023-04-06T03:02:38Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T03:02:38Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-04-06T03:02:38Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpgaBuIV#[email protected]" "--release" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T03:02:38Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-04-06T03:02:39Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpgaBuIV#[email protected]" "--release" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpgaBuIV\\incremental-state"
[2023-04-06T03:02:39Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T03:02:39Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpgaBuIV#[email protected]" "--release" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpgaBuIV\\incremental-state"
Executing benchmark tuple-stress (8/8)
Preparing tuple-stress
[2023-04-06T03:02:40Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None
[2023-04-06T03:02:40Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
---
[2023-04-06T03:02:40Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T03:02:40Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-04-06T03:02:40Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmp7dlsyl#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T03:02:46Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-04-06T03:02:46Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmp7dlsyl#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmp7dlsyl\\incremental-state"
[2023-04-06T03:02:52Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-04-06T03:02:52Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmp7dlsyl#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmp7dlsyl\\incremental-state"
[2023-04-06T03:02:54Z DEBUG collector::benchmark::patch] applying new row to "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmp7dlsyl"
[2023-04-06T03:02:54Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2023-04-06T03:02:54Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2023-04-06T03:02:54Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmp7dlsyl#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmp7dlsyl\\incremental-state"
[2023-04-06T03:03:00Z DEBUG collector::benchmark] Benchmark iteration 1/1
[2023-04-06T03:03:00Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-04-06T03:03:00Z DEBUG collector::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmp6XJMj5#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2023-04-06T03:03:06Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
---
Finished benchmark tuple-stress (8/8)
stage-build DEBUG: Reverting working dir to `C:\a\rust\rust`
stage-build INFO: Merging Rustc PGO profiles to C:\a\rust\rust\opt-artifacts\rustc-pgo.profdata
stage-build INFO: Executing `C:\a\rust\rust\build\x86_64-pc-windows-msvc\llvm\bin\llvm-profdata merge -o C:\a\rust\rust\opt-artifacts\rustc-pgo.profdata C:\a\rust\rust\opt-artifacts\rustc-pgo`
warning: C:\a\rust\rust\opt-artifacts\rustc-pgo\default_17558193318278087430_0.profraw: malformed instrumentation profile data: not enough space for another header
error: no profile can be merged
stage-build INFO: Section `Stage 2 (rustc PGO) > Gather profiles` ended: FAIL (1077.87s)
stage-build INFO: Section `Stage 2 (rustc PGO)` ended: FAIL (2130.89s)
stage-build ERROR: The multi-stage build has failed
------------------------------------------------
Stage 1 (LLVM PGO):            2625.41s (55.20%)
  Build rustc and LLVM:        1865.45s (39.22%)
    LLVM:                       405.95s ( 8.53%)
---
Total duration:                       1h 19m 16s
------------------------------------------------
root INFO: Free disk space: 111.36 GiB out of total 299.51 GiB (62.82% used)
Traceback (most recent call last):
  File "C:\a\rust\rust\src\ci\stage-build.py", line 839, in <module>
    raise e
  File "C:\a\rust\rust\src\ci\stage-build.py", line 836, in <module>
    execute_build_pipeline(timer, pipeline, build_args)
  File "C:\a\rust\rust\src\ci\stage-build.py", line 784, in execute_build_pipeline
    gather_rustc_profiles(pipeline)
  File "C:\a\rust\rust\src\ci\stage-build.py", line 629, in gather_rustc_profiles
    cmd([
  File "C:\a\rust\rust\src\ci\stage-build.py", line 452, in cmd
    return subprocess.run(args, env=environment, check=True)
  File "C:\hostedtoolcache\windows\Python\3.11.2\x64\Lib\subprocess.py", line 571, in run
  File "C:\hostedtoolcache\windows\Python\3.11.2\x64\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\llvm\\bin\\llvm-profdata', 'merge', '-o', 'C:\\a\\rust\\rust\\opt-artifacts\\rustc-pgo.profdata', 'C:\\a\\rust\\rust\\opt-artifacts\\rustc-pgo']' returned non-zero exit status 1.

aliemjay added a commit to aliemjay/rust that referenced this pull request Apr 15, 2023
rustdoc: use a template to generate Hrefs

Previously, href always returned a string, so each link incurred at least one allocation. We were also using `"../".repeat()`, and `.collect()` into strings to generate part of the paths. This abstracts away those repetitions into a couple of helper structs, ParentDirectories and PathComponents, and puts them together into an `Href` template, which should save some allocations. As a side benefit, I think it makes the logic of constructing links a little clearer.

This removes the only call sites for certain methods of UrlPartsBuilder, so it also removes those methods.

Also, remove the ItemType return value from `href` and friends; it was basically unused.

Part of rust-lang#108868
@bors
Copy link
Contributor

bors commented May 9, 2023

☔ The latest upstream changes (presumably #111358) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented May 22, 2023

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout href-template (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self href-template --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustdoc/html/highlight.rs
Auto-merging src/librustdoc/html/format.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/format.rs
Auto-merging src/librustdoc/clean/types.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors
Copy link
Contributor

bors commented Jul 14, 2023

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout href-template (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self href-template --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustdoc/html/highlight.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/highlight.rs
Auto-merging src/librustdoc/html/format.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/format.rs
Auto-merging src/librustdoc/clean/types.rs
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 2671 and retry the command.
Automatic merge failed; fix conflicts and then commit the result.

@bors
Copy link
Contributor

bors commented Sep 4, 2023

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout href-template (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self href-template --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustdoc/html/highlight.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/highlight.rs
Auto-merging src/librustdoc/html/format.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/format.rs
Auto-merging src/librustdoc/clean/types.rs
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 3689 and retry the command.
Automatic merge failed; fix conflicts and then commit the result.

@bors
Copy link
Contributor

bors commented Sep 25, 2023

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout href-template (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self href-template --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustdoc/html/highlight.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/highlight.rs
Auto-merging src/librustdoc/html/format.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/format.rs
Auto-merging src/librustdoc/clean/types.rs
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 4233 and retry the command.
Automatic merge failed; fix conflicts and then commit the result.

@Dylan-DPC
Copy link
Member

@jsha any updates on this?

@bors
Copy link
Contributor

bors commented Oct 26, 2023

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout href-template (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self href-template --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustdoc/html/highlight.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/highlight.rs
Auto-merging src/librustdoc/html/format.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/format.rs
Auto-merging src/librustdoc/clean/types.rs
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 5219 and retry the command.
Automatic merge failed; fix conflicts and then commit the result.

@bors
Copy link
Contributor

bors commented Dec 15, 2023

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout href-template (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self href-template --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustdoc/html/highlight.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/highlight.rs
Auto-merging src/librustdoc/html/format.rs
CONFLICT (content): Merge conflict in src/librustdoc/html/format.rs
Auto-merging src/librustdoc/clean/types.rs
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 6613 and retry the command.
Automatic merge failed; fix conflicts and then commit the result.

@fmease
Copy link
Member

fmease commented Jan 24, 2024

(I had to synchronize the queue)
@bors r-

@bors bors 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 Jan 24, 2024
@Dylan-DPC
Copy link
Member

Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks

@Dylan-DPC Dylan-DPC closed this Mar 14, 2024
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants