Skip to content

Command line options to scala misbehaving #12318

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
griggt opened this issue May 3, 2021 · 2 comments · Fixed by #12370
Closed

Command line options to scala misbehaving #12318

griggt opened this issue May 3, 2021 · 2 comments · Fixed by #12370

Comments

@griggt
Copy link
Contributor

griggt commented May 3, 2021

Compiler version

3.0.1-RC1-bin-SNAPSHOT-git-d66a81c

Output

$ ./bin/scala -Xprint:typer
Unrecognized option: -Xprint:typer
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
$ ./bin/scala -help
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32	  use a 32-bit data model if available
    -d64	  use a 64-bit data model if available
    -server	  to select the "server" VM
                  The default VM is server,
                  because you are running on a server-class machine.


    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

Expectation

scala -Xprint:typer should start the REPL with tree printing after typer phase

scala -help should show help for scala, not java

Notes

Other command line options may be broken as well, these are just the first two that I tried.

This seems to be a recent regression, it works as expected in 3.0.0-RC3.

@som-snytt
Copy link
Contributor

Even in its help message, Scala asks, WWJD?

@liufengyun
Copy link
Contributor

It might be related to #12197.

@liufengyun liufengyun added this to the 3.1.0 milestone May 4, 2021
@liufengyun liufengyun self-assigned this May 4, 2021
liufengyun added a commit to dotty-staging/dotty that referenced this issue May 7, 2021
liufengyun added a commit to dotty-staging/dotty that referenced this issue May 7, 2021
liufengyun added a commit that referenced this issue May 10, 2021
michelou pushed a commit to michelou/scala3 that referenced this issue May 10, 2021
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