Skip to content

Commit 5576fed

Browse files
committed
Update scala settings
1 parent 97313ed commit 5576fed

File tree

111 files changed

+269
-175
lines changed

Some content is hidden

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

111 files changed

+269
-175
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
@@ -82,7 +82,7 @@ class Driver {
8282
Positioned.init(using ictx)
8383

8484
inContext(ictx) {
85-
if !ctx.settings.YdropComments.value || ctx.settings.YreadComments.value then
85+
if !ctx.settings.XdropComments.value || ctx.settings.XreadComments.value then
8686
ictx.setProperty(ContextDoc, new ContextDocstrings)
8787
val fileNamesOrNone = command.checkUsage(summary, sourcesRequired)(using ctx.settings)(using ctx.settingsState)
8888
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
@@ -79,12 +79,12 @@ object SymbolLoaders {
7979
// offer a setting to resolve the conflict one way or the other.
8080
// This was motivated by the desire to use YourKit probes, which
8181
// require yjp.jar at runtime. See SI-2089.
82-
if (ctx.settings.YtermConflict.value == "package" || ctx.mode.is(Mode.Interactive)) {
82+
if (ctx.settings.XtermConflict.value == "package" || ctx.mode.is(Mode.Interactive)) {
8383
report.warning(
8484
s"Resolving package/object name conflict in favor of package ${preExisting.fullName}. The object will be inaccessible.")
8585
owner.asClass.delete(preExisting)
8686
}
87-
else if (ctx.settings.YtermConflict.value == "object") {
87+
else if (ctx.settings.XtermConflict.value == "object") {
8888
report.warning(
8989
s"Resolving package/object name conflict in favor of object ${preExisting.fullName}. The package will be inaccessible.")
9090
return NoSymbol
@@ -457,7 +457,7 @@ class TastyLoader(val tastyFile: AbstractFile) extends SymbolLoader {
457457
new ClassfileTastyUUIDParser(classfile)(ctx).checkTastyUUID(tastyUUID)
458458
else
459459
// This will be the case in any of our tests that compile with `-Youtput-only-tasty`, or when
460-
// tasty file compiled by `-Yearly-tasty-output-write` comes from an early output jar.
460+
// tasty file compiled by `-Xearly-tasty-output-write` comes from an early output jar.
461461
report.inform(s"No classfiles found for $tastyFile when checking TASTy UUID")
462462

463463
private def mayLoadTreesFromTasty(using Context): Boolean =

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

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

@@ -121,7 +121,7 @@ object handleRecursive:
121121
e
122122

123123
def apply(op: String, details: => String, exc: Throwable, weight: Int = 1)(using Context): Nothing =
124-
if ctx.settings.YnoDecodeStacktraces.value then
124+
if ctx.settings.XnoDecodeStacktraces.value then
125125
throw exc
126126
else exc match
127127
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
@@ -358,7 +358,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
358358
}
359359
catch
360360
case ex: Throwable =>
361-
if !ctx.settings.YnoDecodeStacktraces.value
361+
if !ctx.settings.XnoDecodeStacktraces.value
362362
&& handleRecursive.underlyingStackOverflowOrNull(ex) != null then
363363
throw StackSizeExceeded(mdef)
364364
else
@@ -866,7 +866,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
866866
em"""Recursion limit exceeded while pickling ${ex.mdef}
867867
|in ${ex.mdef.symbol.showLocated}.
868868
|You could try to increase the stacksize using the -Xss JVM option.
869-
|For the unprocessed stack trace, compile with -Yno-decode-stacktraces.""",
869+
|For the unprocessed stack trace, compile with -Xno-decode-stacktraces.""",
870870
ex.mdef.srcPos)
871871

872872
def missing = forwardSymRefs.keysIterator

0 commit comments

Comments
 (0)