diff --git a/sbt/src/sbt-test/apiinfo/show-circular-structure/build.sbt b/sbt/src/sbt-test/apiinfo/show-circular-structure/build.sbt index 0d2d72459..a796de4e7 100644 --- a/sbt/src/sbt-test/apiinfo/show-circular-structure/build.sbt +++ b/sbt/src/sbt-test/apiinfo/show-circular-structure/build.sbt @@ -2,11 +2,11 @@ logLevel := Level.Debug incOptions ~= { _.withApiDebug(true) } -TaskKey[Unit]("show-apis") <<= (compile in Compile, scalaSource in Compile, javaSource in Compile) map { (a: sbt.internal.inc.Analysis, scalaSrc: java.io.File, javaSrc: java.io.File) => +TaskKey[Unit]("show-apis") <<= (compile in Compile, scalaSource in Compile, javaSource in Compile) map { case (a: sbt.internal.inc.Analysis, scalaSrc: java.io.File, javaSrc: java.io.File) => val aApi = a.apis.internalAPI(scalaSrc / "A.scala").api val jApi = a.apis.internalAPI(javaSrc / "test/J.java").api import xsbt.api.DefaultShowAPI import DefaultShowAPI._ - DefaultShowAPI.showSource.show(aApi) - DefaultShowAPI.showSource.show(jApi) + DefaultShowAPI(aApi) + DefaultShowAPI(jApi) } diff --git a/sbt/src/sbt-test/apiinfo/unstable-existential-names/build.sbt b/sbt/src/sbt-test/apiinfo/unstable-existential-names/build.sbt index c8a3bbc69..aad2f129c 100644 --- a/sbt/src/sbt-test/apiinfo/unstable-existential-names/build.sbt +++ b/sbt/src/sbt-test/apiinfo/unstable-existential-names/build.sbt @@ -1,6 +1,6 @@ // checks number of compilation iterations performed since last `clean` run InputKey[Unit]("check-number-of-compiler-iterations") <<= inputTask { (argTask: TaskKey[Seq[String]]) => - (argTask, compile in Compile) map { (args: Seq[String], a: sbt.internal.inc.Analysis) => + (argTask, compile in Compile) map { case (args: Seq[String], a: sbt.internal.inc.Analysis) => assert(args.size == 1) val expectedIterationsNumber = args(0).toInt val allCompilationsSize = a.compilations.allCompilations.size diff --git a/sbt/src/sbt-test/compiler-project/error-in-invalidated/build.sbt b/sbt/src/sbt-test/compiler-project/error-in-invalidated/build.sbt index d29c7592e..c92667cfa 100644 --- a/sbt/src/sbt-test/compiler-project/error-in-invalidated/build.sbt +++ b/sbt/src/sbt-test/compiler-project/error-in-invalidated/build.sbt @@ -1 +1 @@ -incOptions := IncOptions.Default +incOptions := xsbti.compile.IncOptionsUtil.defaultIncOptions diff --git a/sbt/src/sbt-test/compiler-project/inc-ant-style/build.sbt b/sbt/src/sbt-test/compiler-project/inc-ant-style/build.sbt index dd071c738..c00ed3d45 100644 --- a/sbt/src/sbt-test/compiler-project/inc-ant-style/build.sbt +++ b/sbt/src/sbt-test/compiler-project/inc-ant-style/build.sbt @@ -7,7 +7,7 @@ incOptions := incOptions.value.withNameHashing(false).withAntStyle(true) * b) checks overall number of compilations performed */ TaskKey[Unit]("check-compilations") := { - val analysis = (compile in Compile).value + val analysis = (compile in Compile).value match { case analysis: Analysis => analysis } val srcDir = (scalaSource in Compile).value def relative(f: java.io.File): java.io.File = f.relativeTo(srcDir) getOrElse f val allCompilations = analysis.compilations.allCompilations diff --git a/sbt/src/sbt-test/compiler-project/inc-package-class-dependency/build.sbt b/sbt/src/sbt-test/compiler-project/inc-package-class-dependency/build.sbt index 43460d0c0..7f57c476f 100644 --- a/sbt/src/sbt-test/compiler-project/inc-package-class-dependency/build.sbt +++ b/sbt/src/sbt-test/compiler-project/inc-package-class-dependency/build.sbt @@ -1,5 +1,5 @@ TaskKey[Unit]("verify-binary-deps") <<= (compile in Compile, classDirectory in Compile, baseDirectory) map { - (a: sbt.internal.inc.Analysis, classDir: java.io.File, base: java.io.File) => + case (a: sbt.internal.inc.Analysis, classDir: java.io.File, base: java.io.File) => val nestedPkgClass = classDir / "test/nested.class" val fooSrc = base / "src/main/scala/test/nested/Foo.scala" assert(!a.relations.binaryDeps(fooSrc).contains(nestedPkgClass), a.relations.toString) diff --git a/sbt/src/sbt-test/compiler-project/inc-pickled-existential/build.sbt b/sbt/src/sbt-test/compiler-project/inc-pickled-existential/build.sbt index 57e9adbc3..a27ed56ee 100644 --- a/sbt/src/sbt-test/compiler-project/inc-pickled-existential/build.sbt +++ b/sbt/src/sbt-test/compiler-project/inc-pickled-existential/build.sbt @@ -2,7 +2,7 @@ logLevel := Level.Debug // dumps analysis into target/analysis-dump.txt file InputKey[Unit]("check-number-of-compiler-iterations") <<= inputTask { (argTask: TaskKey[Seq[String]]) => - (argTask, compile in Compile) map { (args: Seq[String], a: Analysis) => + (argTask, compile in Compile) map { case (args: Seq[String], a: Analysis) => assert(args.size == 1) val expectedIterationsNumber = args(0).toInt assert(a.compilations.allCompilations.size == expectedIterationsNumber, "a.compilations.allCompilations.size = %d (expected %d)".format(a.compilations.allCompilations.size, expectedIterationsNumber)) diff --git a/sbt/src/sbt-test/compiler-project/inc-pickled-refinement/build.sbt b/sbt/src/sbt-test/compiler-project/inc-pickled-refinement/build.sbt index b7454ac88..a479d91d1 100644 --- a/sbt/src/sbt-test/compiler-project/inc-pickled-refinement/build.sbt +++ b/sbt/src/sbt-test/compiler-project/inc-pickled-refinement/build.sbt @@ -1,5 +1,5 @@ InputKey[Unit]("check-number-of-compiler-iterations") <<= inputTask { (argTask: TaskKey[Seq[String]]) => - (argTask, compile in Compile) map { (args: Seq[String], a: Analysis) => + (argTask, compile in Compile) map { case (args: Seq[String], a: Analysis) => assert(args.size == 1) val expectedIterationsNumber = args(0).toInt assert(a.compilations.allCompilations.size == expectedIterationsNumber, "a.compilations.allCompilations.size = %d (expected %d)".format(a.compilations.allCompilations.size, expectedIterationsNumber)) diff --git a/sbt/src/sbt-test/compiler-project/semantic-errors/project/src/main/scala/sbt/TestPlugin.scala b/sbt/src/sbt-test/compiler-project/semantic-errors/project/src/main/scala/sbt/TestPlugin.scala index caa4e7006..b763b174f 100644 --- a/sbt/src/sbt-test/compiler-project/semantic-errors/project/src/main/scala/sbt/TestPlugin.scala +++ b/sbt/src/sbt-test/compiler-project/semantic-errors/project/src/main/scala/sbt/TestPlugin.scala @@ -14,7 +14,7 @@ object TestPlugin extends AutoPlugin { import autoImport._ override def projectSettings = Seq( savedReporter := new CollectingReporter, - compilerReporter in (Compile, compile) := Some(savedReporter.value), + compilerReporter in (Compile, compile) := savedReporter.value, problems := savedReporter.value.problems ) } diff --git a/sbt/src/sbt-test/compiler-project/separate-analysis-per-scala/build.sbt b/sbt/src/sbt-test/compiler-project/separate-analysis-per-scala/build.sbt index 7a7e1a0e4..c590b6d8f 100644 --- a/sbt/src/sbt-test/compiler-project/separate-analysis-per-scala/build.sbt +++ b/sbt/src/sbt-test/compiler-project/separate-analysis-per-scala/build.sbt @@ -4,9 +4,9 @@ scalaVersion := "2.10.4" crossScalaVersions := List("2.10.4", "2.11.0") -incOptions := incOptions.value.withNewClassfileManager( - ClassfileManager.transactional( +incOptions := incOptions.value.withClassfileManagerType( + xsbti.Maybe.just(new xsbti.compile.TransactionalManagerType( crossTarget.value / "classes.bak", (streams in (Compile, compile)).value.log - ) + )) ) diff --git a/sbt/src/sbt-test/source-dependencies/abstract-type-override/build.sbt b/sbt/src/sbt-test/source-dependencies/abstract-type-override/build.sbt index b7454ac88..a479d91d1 100644 --- a/sbt/src/sbt-test/source-dependencies/abstract-type-override/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/abstract-type-override/build.sbt @@ -1,5 +1,5 @@ InputKey[Unit]("check-number-of-compiler-iterations") <<= inputTask { (argTask: TaskKey[Seq[String]]) => - (argTask, compile in Compile) map { (args: Seq[String], a: Analysis) => + (argTask, compile in Compile) map { case (args: Seq[String], a: Analysis) => assert(args.size == 1) val expectedIterationsNumber = args(0).toInt assert(a.compilations.allCompilations.size == expectedIterationsNumber, "a.compilations.allCompilations.size = %d (expected %d)".format(a.compilations.allCompilations.size, expectedIterationsNumber)) diff --git a/sbt/src/sbt-test/source-dependencies/canon/build.sbt b/sbt/src/sbt-test/source-dependencies/canon/build.sbt index d23dff705..e34f4dcfe 100644 --- a/sbt/src/sbt-test/source-dependencies/canon/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/canon/build.sbt @@ -4,7 +4,7 @@ val checkIterations = inputKey[Unit]("Verifies the accumlated number of iteratio checkIterations := { val expected: Int = (Space ~> NatBasic).parsed - val actual: Int = (compile in Compile).value.compilations.allCompilations.size + val actual: Int = (compile in Compile).value match { case a: Analysis => a.compilations.allCompilations.size } assert(expected == actual, s"Expected $expected compilations, got $actual") } diff --git a/sbt/src/sbt-test/source-dependencies/ext/build.sbt b/sbt/src/sbt-test/source-dependencies/ext/build.sbt index 8aaec76ec..3a1e994b0 100644 --- a/sbt/src/sbt-test/source-dependencies/ext/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/ext/build.sbt @@ -4,6 +4,6 @@ val checkIterations = inputKey[Unit]("Verifies the accumlated number of iteratio checkIterations := { val expected: Int = (Space ~> NatBasic).parsed - val actual: Int = (compile in Compile).value.compilations.allCompilations.size + val actual: Int = (compile in Compile).value match { case a: Analysis => a.compilations.allCompilations.size } assert(expected == actual, s"Expected $expected compilations, got $actual") } \ No newline at end of file diff --git a/sbt/src/sbt-test/source-dependencies/inherited-dependencies/build.sbt b/sbt/src/sbt-test/source-dependencies/inherited-dependencies/build.sbt index 095a01198..5bab26a24 100644 --- a/sbt/src/sbt-test/source-dependencies/inherited-dependencies/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/inherited-dependencies/build.sbt @@ -4,7 +4,7 @@ incOptions := incOptions.value.withNameHashing(false) lazy val verifyDeps = taskKey[Unit]("verify inherited dependencies are properly extracted") verifyDeps := { - val a = compile.in(Compile).value + val a = compile.in(Compile).value match { case a: Analysis => a } val baseDir = baseDirectory.value def relative(f: java.io.File): java.io.File = f.relativeTo(baseDir) getOrElse f def toFile(s: String) = relative(baseDir / (s + ".scala")) diff --git a/sbt/src/sbt-test/source-dependencies/inherited-deps-java/build.sbt b/sbt/src/sbt-test/source-dependencies/inherited-deps-java/build.sbt index c25b54921..da70e229f 100644 --- a/sbt/src/sbt-test/source-dependencies/inherited-deps-java/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/inherited-deps-java/build.sbt @@ -4,7 +4,7 @@ incOptions := incOptions.value.withNameHashing(false) lazy val verifyDeps = taskKey[Unit]("verify inherited dependencies are properly extracted") verifyDeps := { - val a = compile.in(Compile).value + val a = compile.in(Compile).value match { case a: Analysis => a } same(a.relations.publicInherited.internal.forwardMap, expectedDeps.forwardMap) } diff --git a/sbt/src/sbt-test/source-dependencies/inherited-macros/macro-client/build.sbt b/sbt/src/sbt-test/source-dependencies/inherited-macros/macro-client/build.sbt index f416323a0..03a7c3fe5 100644 --- a/sbt/src/sbt-test/source-dependencies/inherited-macros/macro-client/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/inherited-macros/macro-client/build.sbt @@ -1,6 +1,6 @@ // Check that a file has not been recompiled during last compilation InputKey[Unit]("check-not-recompiled") <<= inputTask { (argTask: TaskKey[Seq[String]]) => - (argTask, compile in Compile) map { (args: Seq[String], a: Analysis) => + (argTask, compile in Compile) map { case (args: Seq[String], a: Analysis) => assert(args.size == 1) val fileCompilation = a.apis.internal.collect { case (file, src) if file.name.endsWith(args(0)) => src.compilation }.head val lastCompilation = a.compilations.allCompilations.last diff --git a/sbt/src/sbt-test/source-dependencies/inherited_type_params/build.sbt b/sbt/src/sbt-test/source-dependencies/inherited_type_params/build.sbt index a5982f901..7b9a03bb5 100644 --- a/sbt/src/sbt-test/source-dependencies/inherited_type_params/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/inherited_type_params/build.sbt @@ -1,6 +1,6 @@ name := "test" -TaskKey[Unit]("check-same") <<= compile in Configurations.Compile map { analysis => +TaskKey[Unit]("check-same") <<= compile in Configurations.Compile map { case analysis: Analysis => analysis.apis.internal foreach { case (_, api) => assert( xsbt.api.SameAPI(api.api, api.api) ) } diff --git a/sbt/src/sbt-test/source-dependencies/less-inter-inv-java/build.sbt b/sbt/src/sbt-test/source-dependencies/less-inter-inv-java/build.sbt index d23dff705..e34f4dcfe 100644 --- a/sbt/src/sbt-test/source-dependencies/less-inter-inv-java/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/less-inter-inv-java/build.sbt @@ -4,7 +4,7 @@ val checkIterations = inputKey[Unit]("Verifies the accumlated number of iteratio checkIterations := { val expected: Int = (Space ~> NatBasic).parsed - val actual: Int = (compile in Compile).value.compilations.allCompilations.size + val actual: Int = (compile in Compile).value match { case a: Analysis => a.compilations.allCompilations.size } assert(expected == actual, s"Expected $expected compilations, got $actual") } diff --git a/sbt/src/sbt-test/source-dependencies/less-inter-inv/build.sbt b/sbt/src/sbt-test/source-dependencies/less-inter-inv/build.sbt index d23dff705..e34f4dcfe 100644 --- a/sbt/src/sbt-test/source-dependencies/less-inter-inv/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/less-inter-inv/build.sbt @@ -4,7 +4,7 @@ val checkIterations = inputKey[Unit]("Verifies the accumlated number of iteratio checkIterations := { val expected: Int = (Space ~> NatBasic).parsed - val actual: Int = (compile in Compile).value.compilations.allCompilations.size + val actual: Int = (compile in Compile).value match { case a: Analysis => a.compilations.allCompilations.size } assert(expected == actual, s"Expected $expected compilations, got $actual") } diff --git a/sbt/src/sbt-test/source-dependencies/restore-classes/build.sbt b/sbt/src/sbt-test/source-dependencies/restore-classes/build.sbt index 2231204ea..2ec08ca41 100644 --- a/sbt/src/sbt-test/source-dependencies/restore-classes/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/restore-classes/build.sbt @@ -6,7 +6,7 @@ val checkIterations = inputKey[Unit]("Verifies the accumlated number of iteratio checkIterations := { val expected: Int = (Space ~> NatBasic).parsed - val actual: Int = (compile in Compile).value.compilations.allCompilations.size + val actual: Int = (compile in Compile).value match { case a: Analysis => a.compilations.allCompilations.size } assert(expected == actual, s"Expected $expected compilations, got $actual") } diff --git a/sbt/src/sbt-test/source-dependencies/transitive-memberRef/build.sbt b/sbt/src/sbt-test/source-dependencies/transitive-memberRef/build.sbt index b6deda492..e3f040678 100644 --- a/sbt/src/sbt-test/source-dependencies/transitive-memberRef/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/transitive-memberRef/build.sbt @@ -13,7 +13,7 @@ incOptions := incOptions.value.withRecompileAllFraction(1.0) * b) checks overall number of compilations performed */ TaskKey[Unit]("check-compilations") := { - val analysis = (compile in Compile).value + val analysis = (compile in Compile).value match { case a: Analysis => a } val srcDir = (scalaSource in Compile).value def relative(f: java.io.File): java.io.File = f.relativeTo(srcDir) getOrElse f val allCompilations = analysis.compilations.allCompilations