Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for accepting unstable flags in stable compilers #31847
Comments
alexcrichton
added
T-tools
T-compiler
B-unstable
labels
Feb 23, 2016
This comment has been minimized.
This comment has been minimized.
|
Can -C link-args, -C llvm-args join this list? Both need a replacement which acceps spaces (#30947) |
This comment has been minimized.
This comment has been minimized.
|
@Zoxc for now, no, those are both stable flags and this is just targeted at unstable flags. |
This comment has been minimized.
This comment has been minimized.
|
For myself I use I also use
|
This comment has been minimized.
This comment has been minimized.
+1 on this. (I'm guessing "+1" comments are fine in this thread...?) |
This comment has been minimized.
This comment has been minimized.
|
|
zoumi
referenced this issue
May 10, 2016
Closed
rust-1.8.0-x86_64-pc-windows-gnu can't cross-compiling for windows 32bit #33535
This comment has been minimized.
This comment has been minimized.
|
Note that passing See this example: https://is.gd/cnjaFI . When run locally with Also, I'd like to point out that many linters are using |
This comment has been minimized.
This comment has been minimized.
psFried
commented
Jun 10, 2016
|
Regardless of whether |
This comment has been minimized.
This comment has been minimized.
|
@psFried I believe the plan was to make |
brson
added
the
I-nominated
label
Jul 14, 2016
This comment has been minimized.
This comment has been minimized.
|
Nominating to consider converting to an error. |
This comment has been minimized.
This comment has been minimized.
|
This will break using |
This comment has been minimized.
This comment has been minimized.
|
Have any of the useful flags people mentioned (no-trans, time-passes, On Jul 17, 2016 08:27, "Seo Sanghyeon" notifications@github.com wrote: This will break using -Z time-passes with stable compiler. — |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
#34858 is an example of using |
This comment has been minimized.
This comment has been minimized.
|
I mean, why even ask in this issue for people's use cases if the answers On Jul 19, 2016 07:12, "Seo Sanghyeon" notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
|
Hmm, I think we should considering making a stable variant of Regarding the other flags that were mentioned (time-passes, pretty-expanded, trace-macros): All of these have in common that I feel more comfortable with stabilizing the ability to access said functionality than I do with stabilizing anything about the output. For example, I'd expect What this means is that humans using these switches would probably be fine, but tools would break. Do we think we can realistically declare a stability level of that kind? I guess it is the same as (for example) our general error output, which we expect to change. (We probably want to consider explicit scripting commands like git offers.) |
This comment has been minimized.
This comment has been minimized.
|
Compiler team's current thinking: Its too soon to switch off all support for all current But something we may be able to do in the short term is white list a small subset of What small subset? We suggest starting with any that appear in comments on this thread. Get to it people!!! Add them below if not already above! |
This comment has been minimized.
This comment has been minimized.
|
The contentious flags are these used for debugging user code. I don't feel like they should have the same stability semantics as normal flags. Maybe have |
pnkfelix
removed
the
I-nominated
label
Jul 21, 2016
This comment has been minimized.
This comment has been minimized.
|
It does seem like there is room to have flags that, at minimum, have undefined output. Which effectively means they are unstable and can't really be used for scripting. I am thinking of things like gcc's "dump ast" flags ( |
brson
referenced this issue
Aug 4, 2016
Closed
Forbid the -Z compiler flags from being used in beta and stable releases #24971
This comment has been minimized.
This comment has been minimized.
|
If there is an answer to how we want to stabilize |
This comment has been minimized.
This comment has been minimized.
|
Is there any possibility of changing |
This comment has been minimized.
This comment has been minimized.
|
I know the worry is people bundling things into automated scripts that
parse rustc output, but it does seem like we need to find a way to
stabilize options without stabilizing their output format.
…On Sat, Feb 11, 2017 at 5:03 PM, Jake Goulding ***@***.***> wrote:
Is there any possibility of changing --unpretty=mir to an --emit=mir
option? I'd love to be able to use that for the alternative playground. Is
it possible to stabilize the concept of outputting MIR even if the actual
text form completely changes?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31847 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC3n9GxZ0xsHcOQWmG2i0hq45YEFH-4ks5rbjBGgaJpZM4Hg8-w>
.
|
This comment has been minimized.
This comment has been minimized.
I guess we should also consider that there might come a time where MIR no longer even exists (it didn't in Rust 1.0, afterall!
Pedantically, we say we output LLVM IR, but we certainly don't control the format of that. And it's already changed incompatibly as Rust has upgraded LLVM over time. Maybe we are worrying more than we need to be? |
This comment has been minimized.
This comment has been minimized.
|
The whole point of emiting MIR is for debugging. Comparing MIR output to LLVM-IR/LLVM-BC is unfair here IMO and it should rather be compared with the |
This comment has been minimized.
This comment has been minimized.
I'm totally OK with whichever format...
But for my own selfish reasons, I'd prefer that the MIR for the entire crate be output into a single file (just like LLVM-IR and ASM), as well as being triggered by
How picky should we be about this aspect? The official playground already parses MIR to some extent. |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot concern bootstrap-rustc-builds with the change being planned here, will the There are occasional times where I need to resort to looking at expanded output annotated with node-ids in order to make sense of ICE's that occur from a bootstrap compiler that I am in the process of constructing. |
This comment has been minimized.
This comment has been minimized.
|
Nowadays all you have to do is set |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot resolved bootstrap-rustc-builds (I'm assuming that whatever else is happening based on the change proposed here, |
nagisa
referenced this issue
Feb 19, 2017
Open
rustc --test should not check linking when using --emit=metadata or -Z no-trans #39948
This comment has been minimized.
This comment has been minimized.
|
One problem I noticed with this issue is that Cargo doesn't detect what version of rust is running before passing -Z flags. As a real example, I've enabled CARGO_INCREMENTAL on one of my computers, and it recently ran into a bug on the nightly compiler. I've fallen back to the stable compiler for now, but I get warning about -Zincremental being passed due to this issue. It would be good if Cargo avoided passing -Z flags to rust before it becomes a hard error. Would it help if I filed an issue about this against cargo? |
This comment has been minimized.
This comment has been minimized.
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 23, 2017
juleskers
referenced this issue
Apr 5, 2017
Closed
Stop using deprecated "-Z" rustc-flag to reduce Travis Spam #862
This comment has been minimized.
This comment has been minimized.
|
See also issue #41743 . |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
May 4, 2017
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
May 4, 2017
alexcrichton
referenced this issue
May 4, 2017
Merged
rustc: Forbid `-Z` flags on stable/beta channels #41751
This comment has been minimized.
This comment has been minimized.
|
All major stakeholders have checked in with checkboxes above, and this was re-reviewed during tools triage yesterday, and I've now opened a PR: #41751 |
This comment has been minimized.
This comment has been minimized.
|
Removing |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
May 4, 2017
This comment has been minimized.
This comment has been minimized.
|
@durka we've spent the last year printing that this is going to become an error. |
alexcrichton commentedFeb 23, 2016
This issue is intended to track the process of fixing rustc to not accept unstable flags on stable compilers. It's somewhat of a historical mistake that this was allowed, and we're attempting now to repair the logic to disallow unstable flags on the compiler. Today the compiler has a few unstable flags:
-Z- all debugging options in the compiler are intended to be unstable--pretty- the pretty printer is quite broken in various ways, and it's output is also generally quite unstable--unpretty- the flag and formats emitted here were not intended to be stable--error-format- this support is currently experimental in the compiler and may not be ready for prime-timeFor backwards compatibility the compiler will continue to accept these flags on the stable and beta channels of Rust. In #31793, however, the compiler will start to issue a warning on these channels whenever these flags are passed. The warning message points at this issue.
The next steps on this issue are likely:
If you're coming to this issue via the compiler warning, please feel free to comment with your flag and use case! We're eager to learn which unstable flags are most widely used to prioritize what to stabilize.