Skip to content

Command line tools : option "-version" #11452

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 "-version" #11452

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

Comments

@michelou
Copy link
Contributor

michelou commented Feb 18, 2021

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

Scala 2 output

Behavior is consistent between scala, scalac and scaladoc :

$ export JAVA_HOME=/c/opt/jdk-1.8.0_282-b08/

user@host MINGW64 /w/dotty
$ /c/opt/scala-2.13.4/bin/scala -version
Scala code runner version 2.13.4 -- Copyright 2002-2020, LAMP/EPFL and Lightbend, Inc.

user@host MINGW64 /w/dotty
$ /c/opt/scala-2.13.4/bin/scalac -version
Scala compiler version 2.13.4 -- Copyright 2002-2020, LAMP/EPFL and Lightbend, Inc.

user@host MINGW64 /w/dotty
$ /c/opt/scala-2.13.4/bin/scaladoc -version
Scaladoc version 2.13.4 -- Copyright 2002-2020, LAMP/EPFL and Lightbend, Inc.

Scala 3 output

Only scalac behaves correctly :

user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scala -version
Starting scala3 REPL...
Scala compiler version 3.0.0-RC1 -- Copyright 2002-2021, LAMP/EPFL
scala> :quit

user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scalac -version
Scala compiler version 3.0.0-RC1 -- Copyright 2002-2021, LAMP/EPFL

user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scaladoc -version
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.

@michelou
Copy link
Contributor Author

michelou commented Feb 20, 2021

@BarkingBad As of February 20 Scala 3 output looks as follows with PR #11476 :

user@hostMINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC2-bin-SNAPSHOT/bin/scala -version
Starting scala3 REPL...
Scala compiler version 3.0.0-RC2-bin-SNAPSHOT-git-aa7c21e -- Copyright 2002-2021, LAMP/EPFL
scala> :quit

user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC2-bin-SNAPSHOT/bin/scalac -version
Scala compiler version 3.0.0-RC2-bin-SNAPSHOT-git-aa7c21e -- Copyright 2002-2021, LAMP/EPFL

user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC2-bin-SNAPSHOT/bin/scaladoc -version
Scaladoc version 3.0.0-RC2-bin-SNAPSHOT-git-aa7c21e -- Copyright 2002-2021, LAMP/EPFL
Destination is not provided, please provide '-d' parameter pointing to directory where docs should be created

With scaladoc the line Destination is not provided, ... still appears for me (local build based on PR #11476).

PS. No change with scala.

@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