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

Only depend on CFG_VERSION in rustc_interface #111345

Merged
merged 1 commit into from
May 19, 2023

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented May 8, 2023

This avoids having to rebuild the whole compiler on each commit when omit-git-hash = false.

cc #76720 - this won't fix it, and I'm not suggesting we turn this on by default, but it will make it less painful for people who do have omit-git-hash on as a workaround.

@rustbot
Copy link
Collaborator

rustbot commented May 8, 2023

r? @cjgillot

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

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 8, 2023
@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) labels May 8, 2023
@rust-log-analyzer

This comment has been minimized.

@cjgillot
Copy link
Contributor

cjgillot commented May 8, 2023

The refactor itself looks good.
r=me once #111345 (comment) is resolved;

@jyn514 jyn514 force-pushed the cfg-release-caching branch 2 times, most recently from 2d084a5 to 02ef8c6 Compare May 10, 2023 01:13
@rust-log-analyzer

This comment has been minimized.

@jyn514 jyn514 force-pushed the cfg-release-caching branch 2 times, most recently from 01998bd to 66eab2c Compare May 10, 2023 01:30
all:
$(RUSTC) --emit=metadata --crate-type lib stable.rs
$(RUSTC) --emit=metadata --extern stable=$(TMPDIR)/libstable.rmeta main.rs 2>&1 >/dev/null \
| $(CGREP) -e "stable since $$(cat $(S)/src/version)(-[a-zA-Z]+)?"
Copy link
Member

Choose a reason for hiding this comment

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

Very nice ❤️

Copy link
Member

Choose a reason for hiding this comment

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

I think we support custom metadata in the version string via https://github.com/rust-lang/rust/blob/master/config.example.toml#L557, I'm not quite sure where that goes though. Maybe it doesn't affect this.

Copy link
Member Author

Choose a reason for hiding this comment

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

"it doesn't affect this" is exactly the point of this test - it's ensuring that CFG_RELEASE only has the version number, unlike CFG_VERSION which includes the custom metadata.

this avoids having to rebuild the whole compiler on each commit when
`omit-git-hash = false`.
@jyn514
Copy link
Member Author

jyn514 commented May 18, 2023

r? @est31

@rustbot
Copy link
Collaborator

rustbot commented May 18, 2023

Failed to set assignee to est31: invalid assignee

Note: Only org members, users with write permissions, or people who have commented on the PR may be assigned.

Copy link
Member

@est31 est31 left a comment

Choose a reason for hiding this comment

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

LGTM

@jyn514
Copy link
Member Author

jyn514 commented May 18, 2023

@bors r=cjgillot,est31

@bors
Copy link
Contributor

bors commented May 18, 2023

📌 Commit d5f2b8e has been approved by cjgillot,est31

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 18, 2023
@cjgillot
Copy link
Contributor

@bors r=cjgillot,est31

@bors
Copy link
Contributor

bors commented May 18, 2023

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented May 18, 2023

📌 Commit d5f2b8e has been approved by cjgillot,est31

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented May 18, 2023

⌛ Testing commit d5f2b8e with merge c9dc55d...

@bors
Copy link
Contributor

bors commented May 19, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot,est31
Pushing c9dc55d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 19, 2023
@bors bors merged commit c9dc55d into rust-lang:master May 19, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 19, 2023
@jyn514 jyn514 deleted the cfg-release-caching branch May 19, 2023 00:49
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c9dc55d): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

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)
- - 0
Regressions ❌
(secondary)
1.8% [1.8%, 1.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 640.647s -> 641.544s (0.14%)

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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants