Skip to content

Command line tools : option "-help" #11453

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

Closed
michelou opened this issue Feb 18, 2021 · 1 comment · Fixed by #11476
Closed

Command line tools : option "-help" #11453

michelou opened this issue Feb 18, 2021 · 1 comment · Fixed by #11476

Comments

@michelou
Copy link
Contributor

Behavior of command line option -help is incorrect with Scala 3 (see also issue 11452) :

Scala 2 output

The three commands scala, scalac and scaladoc print some help message :

user@host MINGW64 /w/dotty
$ export JAVA_HOME=/c/opt/jdk-1.8.0_282-b08/

user@host MINGW64 /w/dotty
$ /c/opt/scala-2.13.4/bin/scala -help 2>&1 | head -4
Usage: scala <options> [<script|class|object|jar> <arguments>]
   or  scala -help

All options to scalac (see scalac -help) are also allowed.

user@host MINGW64 /w/dotty
$ /c/opt/scala-2.13.4/bin/scalac -help 2>&1 | head -4
Usage: scalac <options> <source files>

Standard options:
  -Dproperty=value             Pass -Dproperty=value directly to the runtime system.

user@host MINGW64 /w/dotty
$ /c/opt/scala-2.13.4/bin/scaladoc -help 2>&1 | head -4
Usage: scaladoc <options> <source files>

where possible scaladoc options:
  -author                                     Include authors. [false]

Scala 3 output

Only scalac behaves correctly :

user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scala -help
Starting scala3 REPL...
scala> :quit

user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scalac -help 2>&1 | head -4
Usage: scalac <options> <source files>
where possible standard options include:
-P                                                Pass an option to a plugin, e.g. -P:<plugin>:<opt>
-X                                                Print a synopsis of advanced options.

user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scaladoc -help 2>&1 | head -4
Destination is not provided, please provide '-d' parameter pointing to directory where docs should be created
Failure

Expectation

Same behavior for Scala 2 and Scala 3.

@som-snytt
Copy link
Contributor

Also mentioned at #8095

@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants