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

Rename environment variable for overriding rustc version #92825

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

pierwill
Copy link
Member

No description provided.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 12, 2022
@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(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 Jan 12, 2022
@Mark-Simulacrum
Copy link
Member

This will need an update to rustc-perf prior to landing which sets both the old and new env variable to avoid another period of noise.

@pierwill
Copy link
Member Author

This is ready, @matthewjasper—unless there's more to do on the rustc-perf side, first.

@Mark-Simulacrum
Copy link
Member

I want to take a closer look before moving ahead with this, but should be able to get to that shortly. It doesn't seem particularly urgent either, I suppose.

@Mark-Simulacrum
Copy link
Member

So, I think this is okay, but I would like to see this patch expanded -- right now, there's a bunch of different places CFG_VERSION is read in the compiler, and instead I think we can add a single place that reads it -- probably in rustc_session (maybe rustc_data_structures; play it by ear as the root of the relevant crate tree).

That place would do the dispatch on the environment variable querying the version, and be used across all of the places we might read from it -- ideally, that makes the environment variable much more useful, since it's a blanket override to the rustc hash, rather than a partial solution.

I think that should be a relatively lightweight set of changes; can you make them in this PR?

@Mark-Simulacrum Mark-Simulacrum 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 17, 2022
@bjorn3
Copy link
Member

bjorn3 commented Jan 17, 2022

rustc_span doesn't depend on rustc_session.

That place would do the dispatch on the environment variable querying the version, and be used across all of the places we might read from it -- ideally, that makes the environment variable much more useful, since it's a blanket override to the rustc hash, rather than a partial solution.

I think rustc_metadata shouldn't allow overriding the rustc version. Unlike the use in rustc_span it doesn't affect performance in any way. It just changes a couple of bytes at the start of the .rmeta files.

@Mark-Simulacrum
Copy link
Member

Ah, yeah, span is going to be a problem...

I guess it's true that not all of those places are in need of this override (or really benefit). Let's temporarily leave it then and we can reconsider if we need to change it again.

@bors r+

@bors
Copy link
Contributor

bors commented Jan 17, 2022

📌 Commit 68515cb has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 17, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 17, 2022
…askrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#90498 (Clarifications in the target tier policy)
 - rust-lang#92164 (Implement `#[rustc_must_implement_one_of]` attribute)
 - rust-lang#92729 (rustc_codegen_llvm: Remove (almost) unused span parameter from many functions in metadata.rs)
 - rust-lang#92752 (Correct minor typos in some long error code explanations)
 - rust-lang#92801 (Enable wrapping words by default)
 - rust-lang#92825 (Rename environment variable for overriding rustc version)
 - rust-lang#92877 (Remove LLVMRustMarkAllFunctionsNounwind)
 - rust-lang#92936 (rustdoc: Remove `collect` in `html::markdown::parse`)
 - rust-lang#92956 (Add `log2` and `log10` to `NonZeroU*`)
 - rust-lang#92960 (Use `carrying_{mul|add}` in `num::bignum`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6acb704 into rust-lang:master Jan 18, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 18, 2022
@pierwill pierwill deleted the rustc-version-force-rename branch January 18, 2022 15:42
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-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.

7 participants