Closed
Description
- In Scala 2 command line argument files (@-files) are supported by
scalac
andscaladoc
. - In Scala 3 only
scalac
supports @-files (although undocumented, see foreword below).
Foreword - Scala 2 versus Scala 3 help message
Scala 2 output (note the last output line) :
user@host MINGW64 /w/dotty
$ /c/opt/scala-2.13.4/bin/scalac -help 2>&1| grep file
Usage: scalac <options> <source files>
-bootclasspath <path> Override location of bootstrap class files.
-classpath <path> Specify where to find user class files.
-d <directory|jar> destination for generated classfiles.
-dependencyfile <file> Set dependency tracking file.
-enchostg <enchostg> Specify character enchostg used by source files.
-opt-inline-from:<patterns> Patterns for classfile names from which to allow inlining, `help` for details.
-sourcepath <path> Specify location(s) of source files.
-target:<target> Target platform for object files. ([8],9,10,11,12)
@<file> A text file containing compiler arguments (options and source files) [false]
Scala 3 output :
user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scalac -help 2>&1| grep file
Usage: scalac <options> <source files>
-bootclasspath Override location of bootstrap class files.
-classpath Specify where to find user class files.
-d Destination for generated classfiles.
-enchostg Specify character enchostg used by source files.
-from-tasty Compile classes from tasty files. The arguments are .tasty or .jar files.
-project-logo The file that contains the project's logo (in /images).
-semanticdb-target Specify an alternative output directory for SemanticDB files.
-siteroot A directory containing static files from which to generate documentation.
-sourcepath Specify location(s) of source files.
scalac
usage example - Scala 3
user@host MINGW64 /w/dotty
$ export JAVA_HOME=/c/opt/jdk-1.8.0_282-b08/
user@host MINGW64 /w/dotty
$ dir c:\\temp\\classes
user@host MINGW64 /w/dotty
$ cat scalac_opts.txt
-d c:\\temp\\classes tests\\pos\\HelloWorld.scala
user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scalac @scalac_opts.txt
user@host MINGW64 /w/dotty
$ dir c:\\temp\\classes
HelloWorld$.class HelloWorld.class HelloWorld.tasty
user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scala -cp c:\\temp\\classes HelloWorld
hello world
scaladoc
usage example - Scala 2 versus Scala 3
user@host MINGW64 /w/dotty
$ rm -rf c:\\temp\\docs\*
user@host MINGW64 /w/dotty
$ cat scaladoc_opts.txt
-d c:\\temp\\docs tests\\pos\\HelloWorld.scala
user@host MINGW64 /w/dotty
$ /c/opt/scala-2.13.4/bin/scaladoc @scaladoc_opts.txt
user@host MINGW64 /w/dotty
$ dir c:\\temp\\docs
HelloWorld$.html index.html index.js lib
user@host MINGW64 /w/dotty
$ rm -rf c:\\temp\\docs\*
user@host MINGW64 /w/dotty
$ /c/opt/scala-3.0.0-RC1/bin/scaladoc @scaladoc_opts.txt
scaladoc will ignore following non-existent paths: @scaladoc_opts.txt
Destination is not provided, please provide '-d' parameter pointing to directory where docs should be created
Failure
Expectation
Add support for @-files to scaladoc
.