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

Configure nightly branch name in stage0.json #99149

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

pietroalbini
Copy link
Member

The beta version number detection code relies on git to know how many merge commits were made since we branched off, and in doing so hardcodes master as the default branch name. This works for rust-lang/rust, but is problematic for forks that use a different default branch name (in Ferrocene we use main instead).

This PR changes the code to instead load the default branch name from src/stage0.json. bump-stage0 has also been updated to remove the need to update it every time a new field is added to stage0.json.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2022
// There are other fields in the configuration, which will be read by src/bootstrap or other
// tools consuming stage0.json. To avoid the need to update bump-stage0 every time a new field
// is added, we collect all the fields in an untyped Value and serialize them back with the
// same order and structure they were deserialized in.
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure this will just work - https://github.com/serde-rs/json/blob/master/Cargo.toml#L59 might be enabled in our workspace, but I'm not immediately confident it is. I'm not sure optimizing to avoid editing this code is really necessary, and it seems like a good idea to have an explicit list so we don't clobber something in that list.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure this will just work - https://github.com/serde-rs/json/blob/master/Cargo.toml#L59 might be enabled in our workspace, but I'm not immediately confident it is.

Hmm, I explicitly enabled preserve_order in bump-stage0's Cargo.toml: it'd be quite problematic if that didn't enable the feature. Or do you mean something else?

I'm not sure optimizing to avoid editing this code is really necessary, and it seems like a good idea to have an explicit list so we don't clobber something in that list.

I added this commit because I originally forgot to add the new field to bump-stage0 😅

Copy link
Member

Choose a reason for hiding this comment

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

I... completely missed that change to Cargo.toml, not sure how. OK, taking another look it looks like I also managed to miss that we do keep a full list in bootstrap's testing, so that solves that concern too.

However, enabling that feature probably comes at some performance cost, and I think will affect the workspace? At least, it'll affect all bootstrap tools -- which I think might these days include some things that we ship, though not confident on that -- so let's run a try build and perf just in case, and then r=me.

@Mark-Simulacrum
Copy link
Member

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

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

bors commented Jul 11, 2022

⌛ Trying commit 6bc97d0 with merge 43835f653775a5c34c03d6beec22f1253809a9b4...

@bors
Copy link
Contributor

bors commented Jul 11, 2022

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

@rust-timer
Copy link
Collaborator

Queued 43835f653775a5c34c03d6beec22f1253809a9b4 with parent 7d1f57a, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (43835f653775a5c34c03d6beec22f1253809a9b4): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
0.3% 0.3% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-1.7% -1.8% 6
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
2.6% 2.6% 1
Regressions 😿
(secondary)
2.9% 3.7% 2
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-1.1% -1.1% 1
All 😿🎉 (primary) 2.6% 2.6% 1

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: 🎉 relevant improvements found
mean1 max count2
Regressions 😿
(primary)
2.3% 2.3% 1
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-2.4% -2.4% 1
Improvements 🎉
(secondary)
-2.9% -3.8% 3
All 😿🎉 (primary) -0.0% -2.4% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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.

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

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 11, 2022
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 12, 2022

📌 Commit 6bc97d0 has been approved by Mark-Simulacrum

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 Jul 12, 2022
@bors
Copy link
Contributor

bors commented Jul 13, 2022

⌛ Testing commit 6bc97d0 with merge 95e8b86...

@bors
Copy link
Contributor

bors commented Jul 13, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 95e8b86 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 13, 2022
@bors bors merged commit 95e8b86 into rust-lang:master Jul 13, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 13, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (95e8b86): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regressions found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
1.5% 1.5% 3
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regressions found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
3.6% 4.7% 2
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

Cycles

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

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@pietroalbini pietroalbini deleted the pa-nightly-branch branch July 13, 2022 17:31
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants