-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: Fix unusual errors with RUSTC_WRAPPER
#5983
Conversation
This commit fixes the interaction of `cargo fix` and `RUSTC_WRAPPER`, ensuring that Cargo at least doesn't die internally. For now `RUSTC_WRAPPER` is overridden for normal execution but we can eventually one day probably support `RUSTC_WRAPPER`! Closes rust-lang#5981
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
✌️ @dwijnand can now approve this pull request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just sharing my thoughts on 2 parts.
But this is good to land as is, for me.
// (which is typically set to `sccache` for now). Eventually we'll | ||
// probably want to implement `RUSTC_WRAPPER` for `cargo fix`, but we'll | ||
// leave that open as a bug for now. | ||
let mut rustc = if bcx.build_config.cargo_as_rustc_wrapper { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option sounds more generic than it actually is. Before looking it up I would've assumed it was also used for at least cargo rustc
, maybe cargo rustdoc
too (given the chat in #5958).
But, no, it's just set in ops::fix
.
|
||
#[test] | ||
fn does_not_crash_with_rustc_wrapper() { | ||
// We don't have /usr/bin/env on Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So? It's expressly ignored, so whatever you set RUSTC_WRAPPER
doesn't even need to exist on non-windows, no?
@bors: r+ |
📌 Commit 51be742 has been approved by |
⌛ Testing commit 51be742 with merge 65a6fa6933f779d0661203994b89cf5960374122... |
I also manually tested this fixes my case in #5981: $ dcargo new --lib foo && command cd foo && dcargo fix --lib
Created library `foo` project
Checking foo v0.1.0 (file:///Users/dnw/Desktop/foo)
Finished dev [unoptimized + debuginfo] target(s) in 0.55s 🎉 |
r#" | ||
[package] | ||
name = "foo" | ||
version = "0.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old habits die hard 😉
💔 Test failed - status-appveyor |
@bors: retry |
⌛ Testing commit 51be742 with merge 3f51fc606cf615bbaa9ee4f2ae7cae1eb3166bb9... |
💔 Test failed - status-appveyor |
@bors: retry |
fix: Fix unusual errors with `RUSTC_WRAPPER` This commit fixes the interaction of `cargo fix` and `RUSTC_WRAPPER`, ensuring that Cargo at least doesn't die internally. For now `RUSTC_WRAPPER` is overridden for normal execution but we can eventually one day probably support `RUSTC_WRAPPER`! Closes #5981
☀️ Test successful - status-appveyor, status-travis |
This commit fixes the interaction of
cargo fix
andRUSTC_WRAPPER
, ensuringthat Cargo at least doesn't die internally. For now
RUSTC_WRAPPER
isoverridden for normal execution but we can eventually one day probably support
RUSTC_WRAPPER
!Closes #5981