-
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
CARGO_RUSTC_CURRENT_DIR is causing forced rebuilds #14798
Comments
I'm not able to reproduce this on my system on stable
|
Reproduces on nightly
|
Wonder if this was #14701 |
My nightly isn't too old yet if I run out of master, I don't see it
I even switched to 8315873 and didn't see it |
A reproduction without the cargo repo: // src/main.rs
fn main() {
println!("{:?}", option_env!("CARGO_RUSTC_CURRENT_DIR"));
} # .cargo/config.toml
[env]
CARGO_RUSTC_CURRENT_DIR = { value = "", relative = true }
|
When I run I wonder if rustc changed something about how it records paths... |
I switched my default rustc to nightly and still not reproducing this out of cargo master. |
Specifically
yet the env variable we pass to rustc is different. |
Ah, this is specific to I'll remove that code. |
This reverts commit e81d84c. Fixes rust-lang#14798
This is indeed related to #14701, and was pointed out as a caveat #14701 (comment). |
If any "internal" environment Cargo sets for crates is set the I think it is generally a mistake to set Cargo internal envs, as they won't have any effect. We could do something to improve the situation,
|
Problem
In the cargo repo, there is an environment override setting the
CARGO_RUSTC_CURRENT_DIR
environment variable:cargo/.cargo/config.toml
Lines 7 to 10 in 79866e1
This is causing
testsuite
to always be considered dirty on my system. I am getting:Note the difference in trailing
/
Steps
cargo test --test testsuite --no-run
cargo test --test testsuite --no-run
-- This should build testsuite again.Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: