Skip to content

Commit 493f192

Browse files
Merge pull request #9521 from dotty-staging/warn-scala2compat
Enable Scala2Compat deprecation warning
2 parents ea51ad7 + a5a4ecf commit 493f192

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Driver {
7575
inContext(ictx) {
7676
if !ctx.settings.YdropComments.value || ctx.mode.is(Mode.ReadComments) then
7777
ictx.setProperty(ContextDoc, new ContextDocstrings)
78-
if Feature.enabledBySetting(nme.Scala2Compat) && false then // TODO: enable
78+
if Feature.enabledBySetting(nme.Scala2Compat) then
7979
report.warning("-language:Scala2Compat will go away; use -source 3.0-migration instead")
8080
val fileNames = CompilerCommand.checkUsage(summary, sourcesRequired)
8181
fromTastySetup(fileNames, ctx)

project/Build.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,7 @@ object Build {
784784
)
785785

786786
lazy val tastyCoreSettings = Seq(
787-
scalacOptions ~= { old =>
788-
val (language, other) = old.partition(_.startsWith("-language:"))
789-
other :+ (language.headOption.map(_ + ",Scala2Compat").getOrElse("-source:3.0-migration"))
790-
}
787+
scalacOptions += "-source:3.0-migration"
791788
)
792789

793790
lazy val `tasty-core` = project.in(file("tasty")).asTastyCore(NonBootstrapped)

0 commit comments

Comments
 (0)