diff --git a/launch/src/test/scala/CacheTest.scala b/launch/src/test/scala/CacheTest.scala index 6a3a6bbe6..ef76b6b44 100644 --- a/launch/src/test/scala/CacheTest.scala +++ b/launch/src/test/scala/CacheTest.scala @@ -8,8 +8,8 @@ object CacheTest extends Properties("Cache") implicit val functions: Arbitrary[Int => Int] = Arbitrary { Gen.elements(identity[Int], i => -i, i=>i/2, i => i+1) } property("Cache") = Prop.forAll { (key: Int, keys: List[Int], map: Int => Int) => - val cache = new Cache(map) - def toProperty(key: Int) = ("Key " + key) |: ("Value: " + map(key)) |: (cache.apply(key) == map(key)) + val cache = new Cache( (i: Int, _: Unit) => map(i) ) + def toProperty(key: Int) = ("Key " + key) |: ("Value: " + map(key)) |: (cache.apply(key, ()) == map(key)) Prop.all( keys.map(toProperty) : _*) } } \ No newline at end of file diff --git a/main/Defaults.scala b/main/Defaults.scala index 9a53e2498..a13d5ab0a 100644 --- a/main/Defaults.scala +++ b/main/Defaults.scala @@ -145,7 +145,7 @@ object Defaults mainClass <<= discoveredMainClasses map selectPackageMain, run <<= runTask(fullClasspath, mainClass in run, runner in run), runMain <<= runMainTask(fullClasspath, runner in run), - scaladocOptions <<= scalacOptions(identity), + scaladocOptions :== scalacOptions, doc <<= docTask, copyResources <<= copyResourcesTask ) @@ -744,9 +744,6 @@ object Classpaths import DependencyFilter._ def managedJars(config: Configuration, jarTypes: Set[String], up: UpdateReport): Classpath = up.select( configuration = configurationFilter(config.name), artifact = artifactFilter(`type` = jarTypes) ) - def autoPlugins(inputs: Compiler.Inputs, report: UpdateReport): Compiler.Inputs = - inputs.copy(config = inputs.config.copy(options = autoPlugins(report) ++ inputs.config.options)) - def autoPlugins(report: UpdateReport): Seq[String] = { val pluginClasspath = report matching configurationFilter(CompilerPlugin.name) @@ -754,8 +751,8 @@ object Classpaths } lazy val compilerPluginConfig = Seq( - compileInputs <<= (compileInputs, autoCompilerPlugins, update) map { (inputs, auto, report) => - if(auto) autoPlugins(inputs, report) else inputs + scalacOptions <<= (scalacOptions, autoCompilerPlugins, update) map { (options, auto, report) => + if(auto) options ++ autoPlugins(report) else options } ) } diff --git a/main/Keys.scala b/main/Keys.scala index bf86853c3..a2d528635 100644 --- a/main/Keys.scala +++ b/main/Keys.scala @@ -71,8 +71,8 @@ object Keys // compile/doc keys val autoCompilerPlugins = SettingKey[Boolean]("auto-compiler-plugins") val maxErrors = SettingKey[Int]("max-errors") - val scaladocOptions = SettingKey[Seq[String]]("scaladoc-options") - val scalacOptions = SettingKey[Seq[String]]("scalac-options") + val scaladocOptions = TaskKey[Seq[String]]("scaladoc-options") + val scalacOptions = TaskKey[Seq[String]]("scalac-options") val javacOptions = SettingKey[Seq[String]]("javac-options") val compileOrder = SettingKey[CompileOrder.Value]("compile-order") val initialCommands = SettingKey[String]("initial-commands") diff --git a/sbt/src/sbt-test/project/continuations/build.sbt b/sbt/src/sbt-test/project/continuations/build.sbt new file mode 100644 index 000000000..a74d681e4 --- /dev/null +++ b/sbt/src/sbt-test/project/continuations/build.sbt @@ -0,0 +1,14 @@ +scalaVersion := "2.8.1" + +autoCompilerPlugins := true + +addCompilerPlugin("org.scala-lang.plugins" % "continuations" % "2.8.1") + +scalacOptions += "-P:continuations:enable" + +libraryDependencies ++= Seq( + "junit" % "junit" % "4.7" % "test", + "com.novocode" % "junit-interface" % "0.5" % "test" +) + +initialCommands := """assert(Example.x == 20)""" \ No newline at end of file diff --git a/sbt/src/sbt-test/project/continuations/project/build.properties b/sbt/src/sbt-test/project/continuations/project/build.properties deleted file mode 100644 index 067c60f7c..000000000 --- a/sbt/src/sbt-test/project/continuations/project/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -project.name=Continuations -project.version=0.1 \ No newline at end of file diff --git a/sbt/src/sbt-test/project/continuations/project/build/Continutations.scala b/sbt/src/sbt-test/project/continuations/project/build/Continutations.scala deleted file mode 100644 index 52330016a..000000000 --- a/sbt/src/sbt-test/project/continuations/project/build/Continutations.scala +++ /dev/null @@ -1,13 +0,0 @@ -import sbt._ - -class Continuations(info: ProjectInfo) extends DefaultProject(info) with AutoCompilerPlugins -{ - val cont = compilerPlugin("org.scala-lang.plugins" % "continuations" % "2.8.0.RC1") - override def compileOptions = super.compileOptions ++ compileOptions("-P:continuations:enable") - - val junit = "junit" % "junit" % "4.7" % "test" - val bryanjswift = "Bryan J Swift Repository" at "http://repos.bryanjswift.com/maven2/" - val junitInterface = "com.novocode" % "junit-interface" % "0.4.0" % "test" - - override def consoleInit = """assert(Examples.x == 20)""" -} \ No newline at end of file diff --git a/sbt/src/sbt-test/project/continuations/test b/sbt/src/sbt-test/project/continuations/test index fce7f2950..565fa276b 100644 --- a/sbt/src/sbt-test/project/continuations/test +++ b/sbt/src/sbt-test/project/continuations/test @@ -1,5 +1,3 @@ -> ++2.8.0.RC1 -> update > compile > console > test-only ContinuationsTest \ No newline at end of file