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

Stability story of compiler flags #19051

Closed
huonw opened this issue Nov 17, 2014 · 12 comments
Closed

Stability story of compiler flags #19051

huonw opened this issue Nov 17, 2014 · 12 comments
Assignees
Labels
P-medium Medium priority

Comments

@huonw
Copy link
Member

huonw commented Nov 17, 2014

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".

@pnkfelix
Copy link
Member

P-backcompat-libs, 1.0.

@pnkfelix pnkfelix added this to the 1.0 milestone Nov 20, 2014
bors added a commit that referenced this issue Dec 20, 2014
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
@aturon
Copy link
Member

aturon commented Jan 8, 2015

Nominating: we need to consider whether this is essential for beta.

@pnkfelix
Copy link
Member

pnkfelix commented Jan 8, 2015

Assigning 1.0-beta milestone.

@pnkfelix pnkfelix modified the milestones: 1.0 beta, 1.0 Jan 8, 2015
@kmcallister
Copy link
Contributor

cc me

kmcallister added a commit to kmcallister/rust that referenced this issue Jan 19, 2015
…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.
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 20, 2015
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
@pnkfelix
Copy link
Member

assigning to @alexcrichton (but I can take it from you if need be)

@pnkfelix
Copy link
Member

the top-level has been cleaned up, but the sublevels of -C etc have not been addressed.

@pnkfelix
Copy link
Member

reclassifying as 1.0. (not a beta-blocker at this point.)

@pnkfelix pnkfelix modified the milestones: 1.0, 1.0 beta Mar 26, 2015
@emberian
Copy link
Member

My inclination is to not make any hard promises about rustc compat, but try really hard not to break any flag that isn't behind -h or -Z unstable-options.

@rprichard
Copy link
Contributor

The --cfg option's argument is lax (#23301), and escaping a string literal is awkward (e.g. --cfg 'feature="mysql"' vs --cfg feature=mysql). Is this something to fix for 1.0?

@brson
Copy link
Contributor

brson commented Apr 23, 2015

@rprichard I think #23301 can be done as a bug fix later.

@brson
Copy link
Contributor

brson commented Apr 23, 2015

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.

@brson brson added the P-medium Medium priority label Apr 23, 2015
@brson brson removed this from the 1.0 milestone Apr 23, 2015
LeoTestard pushed a commit to LeoTestard/rust that referenced this issue Oct 7, 2015
…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.
@alexcrichton
Copy link
Member

All compiler flags at this point are essentially stable, modulo -Z, which is covered by #31847, so closing in favor of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

9 participants