-
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 misleads users when RUSTC_BOOTSTRAP set by build script #9362
Comments
Sorry, I'm a bit confused about what exactly is misleading here (there are definitely some confusing bits, I just want to clarify what is misleading to you).
I think that is exactly what the change is trying to prevent? I'm uncertain what this means.
I think the message is saying, remove RUSTC_BOOTSTRAP from the build script, and use I just noticed that externally setting |
Ugh, I really really wish there were a way to test stable things from nightly channels. Yes, this is a bug and I intended |
The whole point of rust-lang/rust#77802 was so that you don't have to modify the original build script. |
Ok I think I see the issue - cargo treats RUSTC_BOOTSTRAP different than rustc used to: it only allows nightly features when RUSTC_BOOTSTRAP=1, not on any other value: cargo/src/cargo/core/features.rs Lines 885 to 889 in e870eac
@ehuss do you want cargo to keep that behavior? If so the fix is simple enough, I can just check if |
Err wait no, any value is incorrect, it should only allow it if RUSTC_BOOTSTRAP contains the crate name. Otherwise |
Problem
Starting with 1.52 (currently in beta), Cargo will prevent crates from setting RUSTC_BOOTSTRAP via build scripts. However, that prevention can be by-passed with an explicit RUSTC_BOOTSTRAP=1 in the environment. Cargo misleadingly tells users that
RUSTC_BOOTSTRAP=<crate-name>
will be sufficient to bypass the error.Steps
Cargo.toml:
Running with the bootstrap variable setup as Cargo asks:
Possible Solution(s)
Likely we should either:
The text was updated successfully, but these errors were encountered: