Skip to content

Commit 33c7445

Browse files
committed
Do not advertise deprecated alias
1 parent 8fc97a0 commit 33c7445

File tree

144 files changed

+188
-188
lines changed

Some content is hidden

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

144 files changed

+188
-188
lines changed

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ object projects:
315315
project = "shapeless-3",
316316
sbtTestCommand = "testJVM; testJS",
317317
sbtDocCommand = forceDoc("typeable", "deriving"),
318-
scalacOptions = "-source" :: "3.3" :: SbtCommunityProject.scalacOptions.filter(_ != "-Wsafe-init"), // due to -Xfatal-warnings
318+
scalacOptions = "-source" :: "3.3" :: SbtCommunityProject.scalacOptions.filter(_ != "-Wsafe-init"), // due to -Werror
319319
)
320320

321321
lazy val xmlInterpolator = SbtCommunityProject(
@@ -484,7 +484,7 @@ object projects:
484484
project = "cats",
485485
sbtTestCommand = "set Global/scalaJSStage := FastOptStage;rootJVM/test;rootJS/test",
486486
sbtPublishCommand = "rootJVM/publishLocal;rootJS/publishLocal",
487-
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Wsafe-init") // disable -Ysafe-init or -Wsafe-init, due to -Xfatal-warning
487+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Wsafe-init") // turn off -Wsafe-init due to -Werror
488488
)
489489

490490
lazy val catsMtl = SbtCommunityProject(
@@ -583,10 +583,10 @@ object projects:
583583
extraSbtArgs = List(s"-Dakka.build.scalaVersion=$compilerVersion"),
584584
sbtTestCommand = List(
585585
"set every targetSystemJdk := true",
586-
// selectively disable -Xfatal-warnings due to deprecations
587-
"""set actor/Compile/scalacOptions -= "-Xfatal-warnings"""",
588-
"""set testkit/Compile/scalacOptions -= "-Xfatal-warnings"""",
589-
"""set actorTests/Compile/scalacOptions -= "-Xfatal-warnings"""",
586+
// selectively turn off -Werror due to deprecations
587+
"""set actor/Compile/scalacOptions += "-Werror:false"""",
588+
"""set testkit/Compile/scalacOptions += "-Werror:false"""",
589+
"""set actorTests/Compile/scalacOptions += "-Werror:false"""",
590590
"akka-actor-tests/Test/compile",
591591
).mkString("; "),
592592
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Wsafe-init"),

compiler/src/dotty/tools/dotc/reporting/Reporter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ abstract class Reporter extends interfaces.ReporterResult {
232232

233233
def finalizeReporting()(using Context) =
234234
if (hasWarnings && ctx.settings.Werror.value)
235-
report(new Error("No warnings can be incurred under -Werror (or -Xfatal-warnings)", NoSourcePosition))
235+
report(new Error("No warnings can be incurred under -Werror", NoSourcePosition))
236236

237237
/** Summary of warnings and errors */
238238
def summary: String =

repl/test-resources/repl/rewrite-messages

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ scala> import scala.util._
44
1 | import scala.util._
55
| ^
66
| `_` is no longer supported for a wildcard import; use `*` instead
7-
No warnings can be incurred under -Werror (or -Xfatal-warnings)
7+
No warnings can be incurred under -Werror
88
1 warning found
99
1 error found
1010
scala> extension (x: Int) def foo(y: Int) = x + y
@@ -15,6 +15,6 @@ scala> 2 foo 4
1515
| ^^^
1616
|Alphanumeric method foo is not declared infix; it should not be used as infix operator.
1717
|Instead, use method syntax .foo(...) or backticked identifier `foo`.
18-
No warnings can be incurred under -Werror (or -Xfatal-warnings)
18+
No warnings can be incurred under -Werror
1919
1 warning found
20-
1 error found
20+
1 error found
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
scalac.options = -Xfatal-warnings
1+
scalac.options = -Werror

sbt-test/source-dependencies/sealed-extends-sealed/project/DottyInjectedPlugin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ object DottyInjectedPlugin extends AutoPlugin {
77

88
override val projectSettings = Seq(
99
scalaVersion := sys.props("plugin.scalaVersion"),
10-
scalacOptions ++= Seq("-source:3.0-migration", "-Xfatal-warnings")
10+
scalacOptions ++= Seq("-source:3.0-migration", "-Werror")
1111
)
1212
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
> 'set scalacOptions += "-Xfatal-warnings"'
1+
> 'set scalacOptions += "-Werror"'
22

33
> compile
44

@@ -8,4 +8,4 @@ $ copy-file changes/A.scala A.scala
88
# D.scala needs recompiling because the pattern match in D
99
# is no longer exhaustive, which should be a warning
1010
# there is no way to make warnings errors, so this has to be manually checked
11-
-> compile
11+
-> compile

sbt-test/tasty-compat/add-overload/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ lazy val `a-changes` = project.in(file("a-changes"))
1616

1717
lazy val c = project.in(file("."))
1818
.settings(
19-
scalacOptions ++= Seq("-from-tasty", "-Ycheck:readTasty", "-Xfatal-warnings"),
19+
scalacOptions ++= Seq("-from-tasty", "-Ycheck:readTasty", "-Werror"),
2020
Compile / sources := Seq(new java.io.File("c-input/B.tasty")),
2121
Compile / unmanagedClasspath += (ThisBuild / baseDirectory).value / "c-input",
2222
Compile / classDirectory := (ThisBuild / baseDirectory).value / "c-output"

sbt-test/tasty-compat/add-param-unroll/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ lazy val c = project.in(file("c"))
2929
.settings(commonSettings)
3030
.settings(printSettings)
3131
.settings(
32-
// scalacOptions ++= Seq("-from-tasty", "-Ycheck:readTasty", "-Xfatal-warnings", "-Vprint:readTasty", "-Xprint-types"),
32+
// scalacOptions ++= Seq("-from-tasty", "-Ycheck:readTasty", "-Werror", "-Vprint:readTasty", "-Xprint-types"),
3333
// Compile / sources := Seq(new java.io.File("c-input/B.tasty")),
3434
Compile / unmanagedClasspath += (ThisBuild / baseDirectory).value / "c-input",
3535
Compile / classDirectory := (ThisBuild / baseDirectory).value / "c-output"

tests/disabled/macro/pos/t8013/inpervolated_2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -Xlint
1+
//> using options -Werror -Xlint
22
package t8013
33

44
// unsuspecting user of perverse macro

tests/disabled/partest/neg/t5663-badwarneq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final case class ValueClass3(val value: Int) extends AnyVal
2424

2525
/* It's not possible to run partest without -deprecation.
2626
* Since detecting the warnings requires a neg test with
27-
* -Xfatal-warnings, and deprecation terminates the compile,
27+
* -Werror and deprecation terminates the compile,
2828
* we'll just comment out the nasty part. The point was
2929
* just to show there's nothing special about a trait
3030
* that extends a case class, which is only permitted

0 commit comments

Comments
 (0)