Skip to content

Commit ae971c9

Browse files
committed
Update scala settings
1 parent 8825b07 commit ae971c9

File tree

110 files changed

+266
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+266
-172
lines changed

Test.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@main def hello = println("Hello, world!")

compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ trait BCodeHelpers extends BCodeIdiomatic {
823823
// without it. This is particularly bad because the availability of
824824
// generic information could disappear as a consequence of a seemingly
825825
// unrelated change.
826-
ctx.base.settings.YnoGenericSig.value
826+
ctx.base.settings.XnoGenericSig.value
827827
|| sym.is(Artifact)
828828
|| sym.isAllOf(LiftedMethod)
829829
|| sym.is(Bridge)

compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ object PostProcessorFrontendAccess {
121121
case (None, None) => "8" // least supported version by default
122122

123123
override val debug: Boolean = ctx.debug
124-
override val dumpClassesDirectory: Option[String] = s.Ydumpclasses.valueSetByUser
124+
override val dumpClassesDirectory: Option[String] = s.Xdumpclasses.valueSetByUser
125125
override val outputDirectory: AbstractFile = s.outputDir.value
126126
override val mainClass: Option[String] = s.XmainClass.valueSetByUser
127-
override val jarCompressionLevel: Int = s.YjarCompressionLevel.value
127+
override val jarCompressionLevel: Int = s.XjarCompressionLevel.value
128128
override val backendParallelism: Int = s.YbackendParallelism.value
129129
override val backendMaxWorkerQueue: Option[Int] = s.YbackendWorkerQueue.valueSetByUser
130130
override val outputOnlyTasty: Boolean = s.YoutputOnlyTasty.value

compiler/src/dotty/tools/dotc/Driver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Driver {
8585
Positioned.init(using ictx)
8686

8787
inContext(ictx) {
88-
if !ctx.settings.YdropComments.value || ctx.settings.YreadComments.value then
88+
if !ctx.settings.XdropComments.value || ctx.settings.XreadComments.value then
8989
ictx.setProperty(ContextDoc, new ContextDocstrings)
9090
val fileNamesOrNone = command.checkUsage(summary, sourcesRequired)(using ctx.settings)(using ctx.settingsState)
9191
fileNamesOrNone.map { fileNames =>

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 44 additions & 19 deletions
Large diffs are not rendered by default.

compiler/src/dotty/tools/dotc/config/Settings.scala

Lines changed: 74 additions & 59 deletions
Large diffs are not rendered by default.

compiler/src/dotty/tools/dotc/core/Phases.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,15 +349,15 @@ object Phases {
349349
def subPhases: List[Run.SubPhase] = Nil
350350
final def traversals: Int = if subPhases.isEmpty then 1 else subPhases.length
351351

352-
/** skip the phase for a Java compilation unit, may depend on -Yjava-tasty */
352+
/** skip the phase for a Java compilation unit, may depend on -Xjava-tasty */
353353
def skipIfJava(using Context): Boolean = true
354354

355355
final def isAfterLastJavaPhase(using Context): Boolean =
356-
// With `-Yjava-tasty` nominally the final phase is expected be ExtractAPI,
356+
// With `-Xjava-tasty` nominally the final phase is expected be ExtractAPI,
357357
// otherwise drop Java sources at the end of TyperPhase.
358358
// Checks if the last Java phase is before this phase,
359359
// which always fails if the terminal phase is before lastJavaPhase.
360-
val lastJavaPhase = if ctx.settings.YjavaTasty.value then sbtExtractAPIPhase else typerPhase
360+
val lastJavaPhase = if ctx.settings.XjavaTasty.value then sbtExtractAPIPhase else typerPhase
361361
lastJavaPhase <= this
362362

363363
/** @pre `isRunnable` returns true */

compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ object SymbolLoaders {
8080
// offer a setting to resolve the conflict one way or the other.
8181
// This was motivated by the desire to use YourKit probes, which
8282
// require yjp.jar at runtime. See SI-2089.
83-
if (ctx.settings.YtermConflict.value == "package" || ctx.mode.is(Mode.Interactive)) {
83+
if (ctx.settings.XtermConflict.value == "package" || ctx.mode.is(Mode.Interactive)) {
8484
report.warning(
8585
s"Resolving package/object name conflict in favor of package ${preExisting.fullName}. The object will be inaccessible.")
8686
owner.asClass.delete(preExisting)
8787
}
88-
else if (ctx.settings.YtermConflict.value == "object") {
88+
else if (ctx.settings.XtermConflict.value == "object") {
8989
report.warning(
9090
s"Resolving package/object name conflict in favor of object ${preExisting.fullName}. The package will be inaccessible.")
9191
return NoSymbol
@@ -470,7 +470,7 @@ class TastyLoader(val tastyFile: AbstractFile) extends SymbolLoader {
470470
new ClassfileTastyUUIDParser(classfile)(ctx).checkTastyUUID(tastyUUID)
471471
else
472472
// This will be the case in any of our tests that compile with `-Youtput-only-tasty`, or when
473-
// tasty file compiled by `-Yearly-tasty-output-write` comes from an early output jar.
473+
// tasty file compiled by `-Xearly-tasty-output-write` comes from an early output jar.
474474
report.inform(s"No classfiles found for $tastyFile when checking TASTy UUID")
475475

476476
private def checkBeTastyUUID(tastyFile: AbstractFile, tastyBytes: Array[Byte])(using Context): Unit =

compiler/src/dotty/tools/dotc/core/TypeErrors.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ extends TypeError:
102102
em"""Recursion limit exceeded.
103103
|Maybe there is an illegal cyclic reference?
104104
|If that's not the case, you could also try to increase the stacksize using the -Xss JVM option.
105-
|For the unprocessed stack trace, compile with -Yno-decode-stacktraces.
105+
|For the unprocessed stack trace, compile with -Xno-decode-stacktraces.
106106
|A recurring operation is (inner to outer):
107107
|${opsString(mostCommon).stripMargin}"""
108108

@@ -122,7 +122,7 @@ object handleRecursive:
122122
e
123123

124124
def apply(op: String, details: => String, exc: Throwable, weight: Int = 1)(using Context): Nothing =
125-
if ctx.settings.YnoDecodeStacktraces.value then
125+
if ctx.settings.XnoDecodeStacktraces.value then
126126
throw exc
127127
else exc match
128128
case _: RecursionOverflow =>

compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
385385
}
386386
catch
387387
case ex: Throwable =>
388-
if !ctx.settings.YnoDecodeStacktraces.value
388+
if !ctx.settings.XnoDecodeStacktraces.value
389389
&& handleRecursive.underlyingStackOverflowOrNull(ex) != null then
390390
throw StackSizeExceeded(mdef)
391391
else
@@ -924,7 +924,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
924924
em"""Recursion limit exceeded while pickling ${ex.mdef}
925925
|in ${ex.mdef.symbol.showLocated}.
926926
|You could try to increase the stacksize using the -Xss JVM option.
927-
|For the unprocessed stack trace, compile with -Yno-decode-stacktraces.""",
927+
|For the unprocessed stack trace, compile with -Xno-decode-stacktraces.""",
928928
ex.mdef.srcPos)
929929

930930
def missing = forwardSymRefs.keysIterator

0 commit comments

Comments
 (0)