-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Stability story of compiler flags #19051
Comments
P-backcompat-libs, 1.0. |
This commit shuffles around some CLI flags of the compiler to some more stable locations with some renamings. The changes made were: * The `-v` flag has been repurposes as the "verbose" flag. The version flag has been renamed to `-V`. * The `-h` screen has been split into two parts. Most top-level options (not all) show with `-h`, and the remaining options (generally obscure) can be shown with `--help -v` which is a "verbose help screen" * The `-V` flag (version flag now) has lost its argument as it is now requested with `rustc -vV` "verbose version". * The `--emit` option has had its `ir` and `bc` variants renamed to `llvm-ir` and `llvm-bc` to emphasize that they are LLVM's IR/bytecode. * The `--emit` option has grown a new variant, `dep-info`, which subsumes the `--dep-info` CLI argument. The `--dep-info` flag is now deprecated. * The `--parse-only`, `--no-trans`, `--no-analysis`, and `--pretty` flags have moved behind the `-Z` family of flags. * The `--debuginfo` and `--opt-level` flags were moved behind the top-level `-C` flag. * The `--print-file-name` and `--print-crate-name` flags were moved behind one global `--print` flag which now accepts one of `crate-name`, `file-names`, or `sysroot`. This global `--print` flag is intended to serve as a mechanism for learning various metadata about the compiler itself. * The top-level `--pretty` flag was moved to a number of `-Z` options. No warnings are currently enabled to allow tools like Cargo to have time to migrate to the new flags before spraying warnings to all users. cc #19051
Nominating: we need to consider whether this is essential for beta. |
Assigning 1.0-beta milestone. |
cc me |
…utput I bet we can find other uses for these sorts of characters in clarifying type errors, etc. This is marked as a "stable" flag for consistency with --color. However we should reconsider both of them as part of rust-lang#19051. For these features to be conveniently available with Cargo, we may want to use environment variables or a config file.
This commit removes a number of deprecated flags from the compiler: * opt-level => -C opt-level * debuginfo => -C debuginfo * print-crate-name => --print crate-name * print-file-name => --print file-names * no-trans => -Z no-trans * no-analysis => -Z no-analysis * parse-only => -Z parse-only * dep-info => --emit dep-info This commit also moves the --pretty flag behind `-Z unstable-options` as the pretty printer will likely not be stable for 1.0 cc rust-lang#19051
assigning to @alexcrichton (but I can take it from you if need be) |
the top-level has been cleaned up, but the sublevels of |
reclassifying as 1.0. (not a beta-blocker at this point.) |
My inclination is to not make any hard promises about |
The |
@rprichard I think #23301 can be done as a bug fix later. |
Re-triaging as P-medium. There doesn't seem much momentum to make any drastic improvements here and the bar to getting into 1.0 is pretty high. |
…utput I bet we can find other uses for these sorts of characters in clarifying type errors, etc. This is marked as a "stable" flag for consistency with --color. However we should reconsider both of them as part of rust-lang#19051. For these features to be conveniently available with Cargo, we may want to use environment variables or a config file.
All compiler flags at this point are essentially stable, modulo |
There's a pile of weird and wonderful flags for
rustc
and we should have some conscious story about them and their stability, even if it's just "they're all unstable".The text was updated successfully, but these errors were encountered: