Uh oh!
There was an error while loading. Please reload this page.
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.
rust-highfive
commented
Feb 17, 2016
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Feb 17, 2016
I've personally been perpetually bothered by the fact that we accept This removes some of the extra support around r? @brson |
nagisa
commented
Feb 17, 2016
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 |
steveklabnik
commented
Feb 17, 2016
"is it useful" is very different than "is it stable" though. |
vadimcn
commented
Feb 17, 2016
via email
Let's not forget `--pretty`, kinda hard to debug macros without it. |
alexcrichton
commented
Feb 17, 2016
@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 |
durka
commented
Feb 17, 2016
These flags are very useful, you already have to do a Simon Says with However, @nagisa luckily |
brson
commented
Feb 17, 2016
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. |
aturon
commented
Feb 17, 2016
cc @rust-lang/core |
pnkfelix
commented
Feb 17, 2016
I'm not in favor of doing this. The need to opt in with |
nikomatsakis
commented
Feb 18, 2016
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
|
nrc
commented
Feb 18, 2016
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:
|
nikomatsakis
commented
Feb 19, 2016
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, |
alexcrichton
commented
Feb 20, 2016
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-optionsflag as this is now just based on the release channel. Theparsing is left in for now to prevent scripts from immediately breaking.