From 23762a3ac5a3c9990e7f9807ace0ddf4a65e392f Mon Sep 17 00:00:00 2001 From: jvican Date: Fri, 28 Apr 2017 10:40:29 +0200 Subject: [PATCH] Delete scripted deprecations & CompatibilityLevel We don't have to care about migrations in these removals because no one should be depending on these methods directly. People consume scripted via the sbt plugin. This commit also removes the unused `CompatibilityLevel` which is completely outdated, making reference to Scala 2.9 et al. --- .../src/main/scala/sbt/ScriptedPlugin.scala | 8 +-- .../main/scala/sbt/test/ScriptedTests.scala | 50 ------------------- 2 files changed, 5 insertions(+), 53 deletions(-) diff --git a/scripted/plugin/src/main/scala/sbt/ScriptedPlugin.scala b/scripted/plugin/src/main/scala/sbt/ScriptedPlugin.scala index 212afc1c3..62cd0c6d9 100644 --- a/scripted/plugin/src/main/scala/sbt/ScriptedPlugin.scala +++ b/scripted/plugin/src/main/scala/sbt/ScriptedPlugin.scala @@ -59,13 +59,14 @@ object ScriptedPlugin extends AutoPlugin { ModuleUtilities.getObject("sbt.test.ScriptedTests", loader) } - def scriptedRunTask: Initialize[Task[Method]] = Def task ( + def scriptedRunTask: Initialize[Task[Method]] = Def.task( scriptedTests.value.getClass.getMethod("run", classOf[File], classOf[Boolean], classOf[Array[String]], classOf[File], - classOf[Array[String]]) + classOf[Array[String]], + classOf[java.util.List[File]]) ) import DefaultParsers._ @@ -125,7 +126,8 @@ object ScriptedPlugin extends AutoPlugin { scriptedBufferLog.value: java.lang.Boolean, args.toArray, sbtLauncher.value, - scriptedLaunchOpts.value.toArray + scriptedLaunchOpts.value.toArray, + new java.util.ArrayList() ) } catch { case e: java.lang.reflect.InvocationTargetException => throw e.getCause } } diff --git a/scripted/sbt/src/main/scala/sbt/test/ScriptedTests.scala b/scripted/sbt/src/main/scala/sbt/test/ScriptedTests.scala index c72e41c30..f06004d5f 100644 --- a/scripted/sbt/src/main/scala/sbt/test/ScriptedTests.scala +++ b/scripted/sbt/src/main/scala/sbt/test/ScriptedTests.scala @@ -138,20 +138,6 @@ object ScriptedTests extends ScriptedRunner { class ScriptedRunner { import ScriptedTests._ - @deprecated("No longer used", "0.13.9") - def run(resourceBaseDirectory: File, - bufferLog: Boolean, - tests: Array[String], - bootProperties: File, - launchOpts: Array[String]): Unit = - run(resourceBaseDirectory, - bufferLog, - tests, - ConsoleLogger(), - bootProperties, - launchOpts, - emptyCallback) //new FullLogger(Logger.xlog2Log(log))) - // This is called by project/Scripted.scala // Using java.util.List[File] to encode File => Unit def run(resourceBaseDirectory: File, @@ -165,30 +151,6 @@ class ScriptedRunner { prescripted.add(f); () }) //new FullLogger(Logger.xlog2Log(log))) - @deprecated("No longer used", "0.13.9") - def run(resourceBaseDirectory: File, - bufferLog: Boolean, - tests: Array[String], - bootProperties: File, - launchOpts: Array[String], - prescripted: File => Unit): Unit = - run(resourceBaseDirectory, - bufferLog, - tests, - ConsoleLogger(), - bootProperties, - launchOpts, - prescripted) - - @deprecated("No longer used", "0.13.9") - def run(resourceBaseDirectory: File, - bufferLog: Boolean, - tests: Array[String], - logger: AbstractLogger, - bootProperties: File, - launchOpts: Array[String]): Unit = - run(resourceBaseDirectory, bufferLog, tests, logger, bootProperties, launchOpts, emptyCallback) - def run(resourceBaseDirectory: File, bufferLog: Boolean, tests: Array[String], @@ -260,18 +222,6 @@ private[test] final class ListTests(baseDirectory: File, } } -object CompatibilityLevel extends Enumeration { - val Full, Basic, Minimal, Minimal27, Minimal28 = Value - - def defaultVersions(level: Value) = - level match { - case Full => "2.7.4 2.7.7 2.9.0.RC1 2.8.0 2.8.1" - case Basic => "2.7.7 2.7.4 2.8.1 2.8.0" - case Minimal => "2.7.7 2.8.1" - case Minimal27 => "2.7.7" - case Minimal28 => "2.8.1" - } -} class PendingTestSuccessException(label: String) extends Exception { override def getMessage: String = s"The pending test $label succeeded. Mark this test as passing to remove this failure."