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

Cargo and rustc have inconsistent version flags #690

Closed
mcpherrinm opened this issue Oct 11, 2014 · 9 comments
Closed

Cargo and rustc have inconsistent version flags #690

mcpherrinm opened this issue Oct 11, 2014 · 9 comments

Comments

@mcpherrinm
Copy link

Cargo -V and rustc -v both print version information. Since the two tools are so related, having consistent flags seems like the right thing to do.

Cargo uses -v for verbose. Rustc does not use -V.

I am filing this bug against both cargo & rustc. See rust-lang/rust#17938

@o11c
Copy link
Contributor

o11c commented Oct 11, 2014

There is long practive to use -v for verbose; cargo is correct. At least they both support --version. Additionally, changing rustc can be done without breaking anything.

@EdorianDark
Copy link

It seems to me, that more programs use -v to get the version.
For example the following programs use -v to get the version:

  • gcc
  • mc
  • kwrite
  • konsole
  • clang
  • apt-get
  • firefox

@jakerr
Copy link
Contributor

jakerr commented Oct 13, 2014

Another weird thing I ran into with cargo v.s. rust handling of --version is that cargo's version is printed to stderr, a side effect of using docopt I suspect; while rustc's version goes to stdout.

@utkarshkukreti
Copy link

More languages which use -v:

  • ruby
  • php
  • perl
  • node
  • lua / luajit
  • elixir

and -V:

  • ghc
  • python

and -version:

  • java
  • ocaml
  • scala
  • erl

@utkarshkukreti
Copy link

And all of the above except python, java, scala, and erl print their version to stdout.

@emberian
Copy link
Member

@EdorianDark both clang and gcc use -v for verbose, part of that just happens to be printing out the version (for example, see clang -v foo.c), to get just the version you use --version.

@utkarshkukreti
Copy link

Looks like this has been resolved in rust-lang/rust#19900.

@emberian
Copy link
Member

Indeed.

@alexcrichton
Copy link
Member

Yes, thanks!

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

No branches or pull requests

7 participants