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

mk: Simplify boostrap key strategy #32812

Closed
wants to merge 1 commit into from

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Apr 8, 2016

Since PR #32731 we’re hardcoding the BOOTSTRAP_KEY to a well known value, so there’s no reason to have any key at all. Lets just use a regular environment switch instead.

Hooray for simpler code.

r? @alexcrichton

Since PR rust-lang#32731 we’re hardcoding the BOOTSTRAP_KEY to a well known value, so there’s no reason to
have any key at all. Lets just use a regular environment variable instead.

Hooray for simpler code.
@alexcrichton
Copy link
Member

This is intended to be a speed bump to prevent usage of unstable features on the stable compiler, and while it's certainly not meant to be "secure" by any definition we still want it to be a deterrent. Making it easier to enable unstable features likely isn't a great thing, and this essentially provides a "stable method" to enable unstable features for all of time.

From a user point of view, it's now super easy to hack around unstable features quickly like this and then accidentally get bitten in the future when the unstable feature actually broke. By changing the key every version it provides an extra incentive to not use the key and deters usage.

All in all, I'm not entirely convinced that this is worth it, but others may feel different?

cc @brson
cc @rust-lang/tools

@nrc
Copy link
Member

nrc commented Apr 12, 2016

+1 to leaving as is. Users should have to really try to get unstable features, not just flip an env var.

@nagisa
Copy link
Member Author

nagisa commented Apr 12, 2016

Users should have to really try to get unstable features, not just flip an env var.

@nrc Currently all you need to do is to “flip” env var anyway. You might need to look at the filename of the libraries used by rustc, but that’s pretty much as hard as looking up the actual environment variable name.

@bors
Copy link
Contributor

bors commented Apr 15, 2016

☔ The latest upstream changes (presumably #32895) made this pull request unmergeable. Please resolve the merge conflicts.

@nagisa nagisa closed this May 3, 2016
cuviper added a commit to cuviper/rust that referenced this pull request Oct 19, 2016
This is a follow-up to pull request rust-lang#32812, according to the new
decision in issue rust-lang#36548 to relax bootstrap key logic.  Now *any*
non-empty bootstrap key is allowed to circumvent the feature gate.

For now, the build system still goes through the same motions to set
RUSTC_BOOTSTRAP_KEY according to the prior system.  This is necessary
at least until the next stage0 base includes this relaxed key check.
It also makes it simpler to revert this if we change our mind.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants