From 4271d0281949be53f4b426e9ab48046f6dd8460b Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 27 Jul 2015 13:53:20 -0400 Subject: [PATCH 1/4] make a string interpolation warning go away namely "possible missing interpolator: detected interpolated identifier" --- src/main/scala/scala/tools/partest/nest/Runner.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/scala/tools/partest/nest/Runner.scala b/src/main/scala/scala/tools/partest/nest/Runner.scala index dc13d76..50f4a67 100644 --- a/src/main/scala/scala/tools/partest/nest/Runner.scala +++ b/src/main/scala/scala/tools/partest/nest/Runner.scala @@ -765,7 +765,7 @@ class SuiteRunner( def banner = { val baseDir = fileManager.compilerUnderTest.parent.toString - def relativize(path: String) = path.replace(baseDir, "$baseDir").replace(PathSettings.srcDir.toString, "$sourceDir") + def relativize(path: String) = path.replace(baseDir, s"$$baseDir").replace(PathSettings.srcDir.toString, "$sourceDir") val vmBin = javaHome + fileSeparator + "bin" val vmName = "%s (build %s, %s)".format(javaVmName, javaVmVersion, javaVmInfo) From 95e52e35cffd8c11fa14ac05c732b71e351b87d8 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 27 Jul 2015 13:54:14 -0400 Subject: [PATCH 2/4] enable -Xfatal-warnings we are finally free to do this, now that `-deprecation:false` exists --- build.sbt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 5d7d3da..2d31d34 100644 --- a/build.sbt +++ b/build.sbt @@ -22,10 +22,17 @@ scalaXmlVersion := "1.0.4" scalaCheckVersion := "1.11.6" -// TODO: enable "-Xfatal-warnings" for nightlies, -// off by default because we don't want to break scala/scala pr validation due to deprecation -// don't use for doc scope, scaladoc warnings are not to be reckoned with -scalacOptions in (Compile, compile) ++= Seq("-optimize", "-feature", "-deprecation", "-unchecked", "-Xlint") +// TODO: eliminate "-deprecation:false" for nightlies, +// included by default because we don't want to break scala/scala pr validation +// don't use -Xfatal-warnings for doc scope, scaladoc warnings are not to be reckoned with +scalacOptions in (Compile, compile) ++= + Seq("-feature", "-deprecation:false", "-unchecked", "-Xlint", "-Xfatal-warnings") ++ + (CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, scalaMajor)) if scalaMajor < 12 => + Seq("-optimize") + case _ => + Seq() // maybe "-Yopt:l:classpath" eventually? + }) // dependencies // versions involved in integration builds / that change frequently should be keys, set above! From 2d592f9fd4595d21074b705d2265a3b314f426c8 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 27 Jul 2015 13:57:39 -0400 Subject: [PATCH 3/4] make a Scaladoc warning go away --- src/main/scala/scala/tools/partest/nest/Runner.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/scala/tools/partest/nest/Runner.scala b/src/main/scala/scala/tools/partest/nest/Runner.scala index 50f4a67..2251c15 100644 --- a/src/main/scala/scala/tools/partest/nest/Runner.scala +++ b/src/main/scala/scala/tools/partest/nest/Runner.scala @@ -312,7 +312,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) { * * File paths are detected using the absolute path of the test root. * A string that looks like a file path is normalized by replacing - * the leading segments (the root) with "$ROOT" and by replacing + * the leading segments (the root) with "\$ROOT" and by replacing * any Windows backslashes with the one true file separator char. */ def normalizeLog() { From 3a980197d31ba51bf8b1182ec7ac62d08ae16a2b Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 27 Jul 2015 14:17:16 -0400 Subject: [PATCH 4/4] enable -Xfatal-warnings for Scaladoc too despite the stern warnings warning in build.sbt, we have no such warnings currently --- build.sbt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 2d31d34..a1dc8e0 100644 --- a/build.sbt +++ b/build.sbt @@ -24,8 +24,7 @@ scalaCheckVersion := "1.11.6" // TODO: eliminate "-deprecation:false" for nightlies, // included by default because we don't want to break scala/scala pr validation -// don't use -Xfatal-warnings for doc scope, scaladoc warnings are not to be reckoned with -scalacOptions in (Compile, compile) ++= +scalacOptions ++= Seq("-feature", "-deprecation:false", "-unchecked", "-Xlint", "-Xfatal-warnings") ++ (CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, scalaMajor)) if scalaMajor < 12 =>