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

Ignore empty RUSTC_WRAPPER in bootstrap #124903

Merged
merged 1 commit into from
May 8, 2024
Merged

Conversation

Skepfyr
Copy link
Contributor

@Skepfyr Skepfyr commented May 8, 2024

This change ignores the RUSTC_WRAPPER_REAL environment variable if it's set to the empty string. This matches cargo behaviour and allows users to easily shadow a globally set RUSTC_WRAPPER (which they might have set for non-rustc projects).

I hit this because I have RUSTC_WRAPPER set to sccache in my fish universal env vars, and I can only shadow those locally with an empty string, I can't unset it entirely.

This change ignores the RUSTC_WRAPPER_REAL environment variable if it's
set to the empty string. This matches cargo behaviour and allows users
to easily shadow a globally set RUSTC_WRAPPER (which they might have set
for non-rustc projects).
@rustbot
Copy link
Collaborator

rustbot commented May 8, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @clubby789 (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@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 8, 2024
@clubby789
Copy link
Contributor

I can only shadow those locally with an empty string, I can't unset it entirely

Does env -u RUSTC_WRAPPER ... not work here?

@Skepfyr
Copy link
Contributor Author

Skepfyr commented May 8, 2024

So, it does, but it's a massive pain to use. I'm currently trying to use direnv to unset it for rust-analyzer and any random commands I running, remembering to prefix everything with env -u would be somewhat annoying.

@clubby789
Copy link
Contributor

I guess this makes sense, at least for consistency with Cargo
@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 8, 2024

📌 Commit c7003f5 has been approved by clubby789

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, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#123344 (Remove braces when fixing a nested use tree into a single item)
 - rust-lang#124587 (Generic `NonZero` post-stabilization changes.)
 - rust-lang#124775 (crashes: add lastest batch of crash tests)
 - rust-lang#124869 (Make sure we don't deny macro vars w keyword names)
 - rust-lang#124876 (Simplify `use crate::rustc_foo::bar` occurrences.)
 - rust-lang#124892 (Update cc crate to v1.0.97)
 - rust-lang#124903 (Ignore empty RUSTC_WRAPPER in bootstrap)
 - rust-lang#124909 (Reapply the part of rust-lang#124548 that bors forgot)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 18639db into rust-lang:master May 8, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 8, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
Rollup merge of rust-lang#124903 - Skepfyr:rustc-wrapper, r=clubby789

Ignore empty RUSTC_WRAPPER in bootstrap

This change ignores the RUSTC_WRAPPER_REAL environment variable if it's set to the empty string. This matches cargo behaviour and allows users to easily shadow a globally set RUSTC_WRAPPER (which they might have set for non-rustc projects).

I hit this because I have RUSTC_WRAPPER set to `sccache` in my fish universal env vars, and I can only shadow those locally with an empty string, I can't unset it entirely.
@Skepfyr Skepfyr deleted the rustc-wrapper branch May 9, 2024 07:41
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-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.

None yet

4 participants