Skip to content

Commit 760f549

Browse files
committed
enable -Xfatal-warnings
we are finally free to do this, now that `-deprecation:false` exists
1 parent 9350004 commit 760f549

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

build.sbt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ scalaXmlVersion := "1.0.4"
2222

2323
scalaCheckVersion := "1.11.6"
2424

25-
// TODO: enable "-Xfatal-warnings" for nightlies,
26-
// off by default because we don't want to break scala/scala pr validation due to deprecation
27-
// don't use for doc scope, scaladoc warnings are not to be reckoned with
28-
scalacOptions in (Compile, compile) ++= Seq("-optimize", "-feature", "-deprecation", "-unchecked", "-Xlint")
25+
// TODO: eliminate "-deprecation:false" for nightlies,
26+
// included by default because we don't want to break scala/scala pr validation
27+
// don't use -Xfatal-warnings for doc scope, scaladoc warnings are not to be reckoned with
28+
scalacOptions in (Compile, compile) ++=
29+
Seq("-feature", "-deprecation:false", "-unchecked", "-Xlint", "-Xfatal-warnings") ++
30+
(CrossVersion.partialVersion(scalaVersion.value) match {
31+
case Some((2, scalaMajor)) if scalaMajor < 12 =>
32+
Seq("-optimize")
33+
case _ =>
34+
Seq() // maybe "-Yopt:l:classpath" eventually?
35+
})
2936

3037
// dependencies
3138
// versions involved in integration builds / that change frequently should be keys, set above!

0 commit comments

Comments
 (0)