Getting help on Scala 3/Dotty dotc, dotr, and dotd commands

Just a brief note today that if you need help on the dotc, dotr, and dotd Scala 3/Dotty commands, just type -help after them, like this:

$ dotc -help

Usage: dotc <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.
-Y                 Print a synopsis of private options.
-bootclasspath     Override location of bootstrap class files.
-classpath         Specify where to find user class files.
                   Default: ..
-color             Colored output
                   Default: always.
                   Choices: always, never.
-d                 Destination for generated classfiles.
-deprecation       Emit warning and location for usages of deprecated APIs.
-doc-snapshot      Generate a documentation snapshot for the current Dotty version
-encoding          Specify character encoding used by source files.
                   Default: UTF-8.
-explain           Explain errors in more detail.
-explain-types     Explain type errors in more detail.
-extdirs           Override location of installed extensions.
-feature           Emit warning and location for usages of features that should be imported explicitly.
-from-tasty        Compile classes from tasty in classpath. The arguments are used as class names.
-help              Print a synopsis of standard options.
-indent            Allow significant indentation.
-javabootclasspath Override java boot classpath.
-javaextdirs       Override java extdirs classpath.
-language          Enable one or more language features.
-migration         Emit warning and location for migration issues from Scala 2.
-new-syntax        Require `then` and `do` in control expressions.
-noindent          Require classical {...} syntax, indentation is not significant.
-nowarn            Silence all warnings.
-old-syntax        Require `(...)` around conditions.
-pagewidth         Set page width
                   Default: 80.
-print-lines       Show source code line numbers.
-print-tasty       Prints the raw tasty.
-priorityclasspath Class path that takes precedence over all other paths (or testing only).
-project           The name of the project.
-project-logo      The file that contains the project's logo (in /images).
-project-url       The source repository of your project.
-project-version   The current version of your project.
-rewrite           When used in conjunction with a `...-migration` source version, rewrites sources to migrate to new version.
-scalajs           Compile in Scala.js mode (requires scalajs-library.jar on the classpath).
-semanticdb-target Specify an alternative output directory for SemanticDB files.
-siteroot          A directory containing static files from which to generate documentation.
                   Default: /Users/al/Projects/Books/ScalaCookbook2Examples/16_Ecosystem/Spark/SparkApp1.
-source            source version
                   Default: 3.0.
                   Choices: 3.0, 3.1, 3.0-migration, 3.1-migration.
-sourcepath        Specify location(s) of source files.
-sourceroot        Specify workspace root directory.
                   Default: ..
-target            Target platform for object files. All JVM 1.5 targets are deprecated.
                   Default: jvm-1.8.
                   Choices: jvm-1.5, jvm-1.5-fjbg, jvm-1.5-asm, jvm-1.6, jvm-1.7, jvm-1.8, msil.
-unchecked         Enable additional warnings where generated code depends on assumptions.
-uniqid            Uniquely tag all identifiers in debugging output.
-usejavacp         Utilize the java.class.path in classpath resolution.
-verbose           Output messages about what the compiler is doing.
-version           Print product version and exit.

Depending on what you’re after, it can also help to know that those three Dotty commands are all shell scripts:

$ file `which dotc`
/Users/al/bin/dotty-0.26.0-RC1/bin/dotc: Bourne-Again shell script text executable, ASCII text

$ file `which dotd`
/Users/al/bin/dotty-0.26.0-RC1/bin/dotd: Bourne-Again shell script text executable, ASCII text

$ file `which dotr`
/Users/al/bin/dotty-0.26.0-RC1/bin/dotr: Bourne-Again shell script text executable, ASCII text

Also, see ScalaSettings.scala this source code page on Github for a few more details about scalac options.