Work in Progress

We are still in the process of writing the documentation for Scala 3. You can help us to improve the documentation.

Are you searching for the Scala 2 documentation?

Scala 3 Migration Guide

Compiler Options Lookup Table

Language

The compiler options are classified and ordered according to their Scala 2.13 name. Each Scala 2.13 option is associated with its status in Scala 3.

Status Meaning
it is available in Scala 3
<new-name> It has been renamed to <new-name>
It is not available in 3.0.0 but it could be added later

The current comparison is based on Scala 2.13.4 and 3.0.0-M3.

Standard Settings

2.13.x 3.0.x
-Dproperty=value
-J<flag>
-P:<plugin>:<opt>
-V
-W
-X
-Y
-bootclasspath
-classpath
-d
-dependencyfile
-deprecation
-encoding
-explaintypes -explain-types
-extdirs
-feature
-g
-help
-javabootclasspath
-javaextdirs
-language
-no-specialization
-nobootcp
-nowarn
-opt
-opt-inline-from
-opt-warnings
-optimize
-print
-release
-rootdir
-sourcepath
-target -Xtarget
-toolcp
-unchecked
-uniqid
-usejavacp
-usemanifestc
-verbose
-version

Advanced Settings

2.13.x 3.0.x
-X
-Xcheckinit -Ycheck-init
-Xdev
-Xdisable-assertions
-Xelide-below
-Xexperimental
-Xfuture
-Xgenerate-phase-graph
-Xjline
-Xlint:deprecation -deprecation
-Xlint:<warnings>
-Xlog-implicit-conversion
-Xlog-implicits
-Xlog-reflective-calls
-Xmacro-settings
-Xmain-class
-Xmaxerrs
-Xmaxwarns
-Xmigration
-Xmixin-force-forwarders
-Xno-forwarders
-Xno-patmat-analysis
-Xnojline
-Xplugin
-Xplugin-disable
-Xplugin-list
-Xplugin-require
-Xpluginsdir
-Xprint-args
-Xprompt
-Xreporter
-Xresident
-Xscript
-Xshow-class <class>
-Xshow-object <object>
-Xsource -source
-Xsource-reader
-Xverify -Xverify-signatures
-Xxml

Private settings

2.13.x 3.0.x
-Ybackend-parallelism
-Ybackend-worker-queue
-Ybreak-cycles
-Ycache-macro-class-loader
-Ycache-plugin-class-loader
-Ycheck
-Ycompact-trees
-Ydelambdafy
-Ydump-classes
-Ygen-asmp
-Yhot-statistics
-Yide-debug
-Yimports
-Yissue-debug
-Yjar-compression-level
-YjarFactory
-Ymacro-debug-lite
-Ymacro-debug-verbose
-Ymacro-annotations
-Ymacro-classpath
-Ymacro-expand
-Ymacro-global-fresh-names
-Yno-completion
-Yno-flat-classpath-cache
-Yno-generic-signatures
-Yno-imports
-Yno-predef
-Yopt-inline-heuristics
-Yopt-log-inline <package/Class.method>
-Yopt-trace <package/Class.method>
-Ypatmat-debug
-Ypatmat-exhaust-depth
-Ypos-debug
-Ypresentation-any-thread
-Ypresentation-debug
-Ypresentation-delay
-Ypresentation-locate-source-file
-Ypresentation-log
-Ypresentation-strict
-Ypresentation-verbose
-Yprint-trees
-Yprofile-destination
-Yprofile-enabled
-Yprofile-trace
-Yquasiquote-debug
-Yrangepos
-Yrecursion
-Yreify-copypaste
-Yreify-debug
-Yrepl-class-based
-Yrepl-outdir
-Yrepl-use-magic-imports
-Yresolve-term-conflict
-Yscriptrunner
-Yskip
-Yshow:<phases>
-Yshow-member-pos <output style>
-Yshow-symkinds
-Yshow-symowners
-Yshow-syms
-Ystatistics <phases>
-Ystop-after
-Ystop-before
-Ytyper-debug
-Yvalidate-pos
-Ywarn-dead-code
-Ywarn-numeric-widen
-Ywarn-unused:<warnings>
-Ywarn-value-discard

Verbose Settings

Verbose settings were introduced in 2.13. Most of them are not yet implemented in Scala 3.

2.13.x 3.0.x
-Vbrowse:<phases>
-Vdebug-tasty
-Vdoc
-Vfree-terms
-Vfree-types
-Vhot-statistics
-Vide
-Vimplicit-conversions
-Vimplicits
-Vinline <package/Class.method>
-Vissue
-Vmacro
-Vmacro-lite
-Vopt <package/Class.method>
-Vpatmat
-Vpos
-Vprint:<phases> -Xprint:<phases>
-Vphases -Xshow-phases
-Vclasspath -Ylog-classpath
-Vlog:<phases> -Ylog:<phases>
-Vdebug -Ydebug
-Vprint-args <file>
-Vprint-pos -Yprint-pos
-Vprint-types -Xprint-types
-Vquasiquote
-Vreflective-calls
-Vreify
-Vshow:<phases>
-Vshow-class <class>
-Vshow-member-pos <output style>
-Vshow-object <object>
-Vshow-symkinds
-Vshow-symowners
-Vstatistics <phases>
-Vsymbols
-Vtyper

Warning Settings

Warning settings were introduced in 2.13. Most of them are not yet implemented in Scala 3.

2.13.x 3.0.x
-Wconf
-Wdead-code
-Werror -Xfatal-warnings
-Wextra-implicit
-Wmacros:<mode>
-Wnumeric-widen
-Woctal-literal
-Wunused:<warnings>
-Wvalue-discard
-Wself-implicit

Compiler Plugins

Some useful Scala 2.13 compiler plugins are now shipped into the compiler. You can enable and configure them with some new native options.

Scala.js

2.13.x 3.0.x
-Xplugin:scalajs-compiler_<version>.jar -scalajs
-P:scalajs:genStaticForwardersForNonTopLevelObjects -scalajs-genStaticForwardersForNonTopLevelObjects
-P:scalajs:mapSourceURI -scalajs-mapSourceURI

SemanticDB

2.13.x 3.0.x
-Xplugin:semanticdb-scalac_<version>.jar -Xsemanticdb
-P:semanticdb:targetroot:<path> -semanticdb-target:<path>

Kind-Projector

2.13.x 3.0.x
-Xplugin:kind-projector_<version>.jar -Ykind-projector

Contributors to this page: