-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc: Disallow unstable flags in stable releases #31731
rustc: Disallow unstable flags in stable releases #31731
Conversation
This commit disallows passing recognized unstable flags to the compiler on the stable/beta release channels. This includes options like `-Z`, `--error-format`, `--pretty`, and `--unpretty`. Additionally, this removes interpreting the `-Z unstable-options` flag as this is now just based on the release channel. The parsing is left in for now to prevent scripts from immediately breaking.
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
I've personally been perpetually bothered by the fact that we accept This removes some of the extra support around r? @brson |
Some -Z flags are very useful and I don’t see their behaviour being unstable at all. EDIT: namely people (and, I think, cargo?) rely on no-trans/no-analysis for faster compile-edit cycle, and having everything else is useful for debugging issues with stable rustc (once the flags go away we can’t just ask people to provide output of |
"is it useful" is very different than "is it stable" though. |
Let's not forget `--pretty`, kinda hard to debug macros without it.
|
@nagisa yes as @steveklabnik mentioned something being useful is very different than it being stable. This is basically the same argument for why we have feature gates that are only allowed on nightly compilers, a decision which has long since passed. I also find some unstable APIs useful from time to time, but that doesn't mean they should be available on stable compilers. @vadimcn true, but |
These flags are very useful, you already have to do a Simon Says with However, @nagisa luckily |
It looks like this will make rustc pretend like unstable options don't exist at all on nightly, reporting unrecognized options. To be clearer and more consistent with other stability features I'd rather it report that the option can't be used on the channel because it is unstable. I want to do this, but it needs a lot of consideration since it's a major policy change and breaking change. Edit: I also feel like we haven't been very careful about deciding which options are stable and unstable, and if we did this we would probably want to reconsider each one. Edit 2: Also, there's a very strong case here that the ship has sailed and we can't do this. This is a seriously breaking change. |
cc @rust-lang/core |
I'm not in favor of doing this. The need to opt in with |
It seems to me that the reason to "gate" access to these APIs is the same (Also, we discussed in the core team meeting today, where we said roughly On Wed, Feb 17, 2016 at 3:42 PM, Felix S Klock II notifications@github.com
|
I'm strongly in favour of doing this - unstable options should not be available on release, it defeats the point of them being unstable options, really. Some other points from the thread:
|
On Thu, Feb 18, 2016 at 03:51:47PM -0800, Nick Cameron wrote:
I agree that there is no partcular reason to break existing scripts, |
Yes we discussed this at the core team meeting and reached a few conclusions. For now I've opened #31793 to "stem the bleeding" so we can ensure that all future unstable options are actually unstable. That PR also adds a warning to indicate that As a result, I'm going to close this PR in favor of that one for now. |
This commit disallows passing recognized unstable flags to the compiler on the
stable/beta release channels. This includes options like
-Z
,--error-format
,--pretty
, and--unpretty
. Additionally, this removes interpreting the-Z unstable-options
flag as this is now just based on the release channel. Theparsing is left in for now to prevent scripts from immediately breaking.