diff --git a/build.sbt b/build.sbt index 5d7d3da..a1dc8e0 100644 --- a/build.sbt +++ b/build.sbt @@ -22,10 +22,16 @@ 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 +scalacOptions ++= + 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! diff --git a/src/main/scala/scala/tools/partest/nest/Runner.scala b/src/main/scala/scala/tools/partest/nest/Runner.scala index dc13d76..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() { @@ -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)