From 6a3cfed610a48042333a9e70215e4ccf4321960c Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 19 Oct 2016 15:09:38 -0700 Subject: [PATCH 1/4] Travis config: bump Scala versions --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5075836..45ff9092 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,8 @@ env: - TEST_COMMAND="test" - TEST_COMMAND="scripted" - TEST_COMMAND="testFunctional" - - TEST_COMMAND="-Dmima.testScalaVersion=2.11.7 testFunctional" - - TEST_COMMAND="-Dmima.testScalaVersion=2.12.0-RC1 testFunctional" + - TEST_COMMAND="-Dmima.testScalaVersion=2.11.8 testFunctional" + - TEST_COMMAND="-Dmima.testScalaVersion=2.12.0-RC2 testFunctional" script: - sbt -J-XX:ReservedCodeCacheSize=256M -J-Xmx3072M $TEST_COMMAND From ec9f9d738479ddd4a3d57358be1e5f12d48689a3 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 19 Oct 2016 15:47:48 -0700 Subject: [PATCH 2/4] silence some compiler warnings --- .../abstract-class-added-abstract-method-nok/v2/A.scala | 4 ++-- .../v1/A.scala | 2 +- .../test/added-abstract-class-in-new-version-ok/v2/A.scala | 4 ++-- .../src/test/added-trait-in-new-version-ok/v2/A.scala | 6 +++--- .../v2/A.scala | 4 ++-- .../src/test/trait-added-abstract-method-nok/v2/A.scala | 4 ++-- .../v1/Foldable.scala | 2 ++ .../v2/Foldable.scala | 2 ++ 8 files changed, 16 insertions(+), 12 deletions(-) diff --git a/reporter/functional-tests/src/test/abstract-class-added-abstract-method-nok/v2/A.scala b/reporter/functional-tests/src/test/abstract-class-added-abstract-method-nok/v2/A.scala index 8d644d15..5e068b14 100644 --- a/reporter/functional-tests/src/test/abstract-class-added-abstract-method-nok/v2/A.scala +++ b/reporter/functional-tests/src/test/abstract-class-added-abstract-method-nok/v2/A.scala @@ -1,3 +1,3 @@ abstract class A { - def foo: Unit -} \ No newline at end of file + def foo(): Unit +} diff --git a/reporter/functional-tests/src/test/abstract-class-extending-new-trait-with-abstract-method-ok/v1/A.scala b/reporter/functional-tests/src/test/abstract-class-extending-new-trait-with-abstract-method-ok/v1/A.scala index f4fe136c..5e068b14 100644 --- a/reporter/functional-tests/src/test/abstract-class-extending-new-trait-with-abstract-method-ok/v1/A.scala +++ b/reporter/functional-tests/src/test/abstract-class-extending-new-trait-with-abstract-method-ok/v1/A.scala @@ -1,3 +1,3 @@ abstract class A { - def foo: Unit + def foo(): Unit } diff --git a/reporter/functional-tests/src/test/added-abstract-class-in-new-version-ok/v2/A.scala b/reporter/functional-tests/src/test/added-abstract-class-in-new-version-ok/v2/A.scala index b79ee383..4c6668dc 100644 --- a/reporter/functional-tests/src/test/added-abstract-class-in-new-version-ok/v2/A.scala +++ b/reporter/functional-tests/src/test/added-abstract-class-in-new-version-ok/v2/A.scala @@ -1,4 +1,4 @@ class A abstract class B { - def foo: Unit -} \ No newline at end of file + def foo(): Unit +} diff --git a/reporter/functional-tests/src/test/added-trait-in-new-version-ok/v2/A.scala b/reporter/functional-tests/src/test/added-trait-in-new-version-ok/v2/A.scala index ad313fd7..82818393 100644 --- a/reporter/functional-tests/src/test/added-trait-in-new-version-ok/v2/A.scala +++ b/reporter/functional-tests/src/test/added-trait-in-new-version-ok/v2/A.scala @@ -1,5 +1,5 @@ class A trait B { - def foo: Unit - def bar: Unit = () -} \ No newline at end of file + def foo(): Unit + def bar(): Unit = () +} diff --git a/reporter/functional-tests/src/test/class-added-abstract-method-in-new-version-nok/v2/A.scala b/reporter/functional-tests/src/test/class-added-abstract-method-in-new-version-nok/v2/A.scala index 8d644d15..5e068b14 100644 --- a/reporter/functional-tests/src/test/class-added-abstract-method-in-new-version-nok/v2/A.scala +++ b/reporter/functional-tests/src/test/class-added-abstract-method-in-new-version-nok/v2/A.scala @@ -1,3 +1,3 @@ abstract class A { - def foo: Unit -} \ No newline at end of file + def foo(): Unit +} diff --git a/reporter/functional-tests/src/test/trait-added-abstract-method-nok/v2/A.scala b/reporter/functional-tests/src/test/trait-added-abstract-method-nok/v2/A.scala index 53c89d79..87f70026 100644 --- a/reporter/functional-tests/src/test/trait-added-abstract-method-nok/v2/A.scala +++ b/reporter/functional-tests/src/test/trait-added-abstract-method-nok/v2/A.scala @@ -1,3 +1,3 @@ trait A { - def foo: Unit -} \ No newline at end of file + def foo(): Unit +} diff --git a/reporter/functional-tests/src/test/trait-extending-new-trait-with-concrete-method-nok/v1/Foldable.scala b/reporter/functional-tests/src/test/trait-extending-new-trait-with-concrete-method-nok/v1/Foldable.scala index 7b38878b..2f2a60a7 100644 --- a/reporter/functional-tests/src/test/trait-extending-new-trait-with-concrete-method-nok/v1/Foldable.scala +++ b/reporter/functional-tests/src/test/trait-extending-new-trait-with-concrete-method-nok/v1/Foldable.scala @@ -1,3 +1,5 @@ +import scala.language.higherKinds + trait Foldable[F[_]]{ def foldLeft[A, B](fa: F[A], z: B)(f: (B, A) => B): B } diff --git a/reporter/functional-tests/src/test/trait-extending-new-trait-with-concrete-method-nok/v2/Foldable.scala b/reporter/functional-tests/src/test/trait-extending-new-trait-with-concrete-method-nok/v2/Foldable.scala index f2f814bf..abea7725 100644 --- a/reporter/functional-tests/src/test/trait-extending-new-trait-with-concrete-method-nok/v2/Foldable.scala +++ b/reporter/functional-tests/src/test/trait-extending-new-trait-with-concrete-method-nok/v2/Foldable.scala @@ -1,3 +1,5 @@ +import scala.language.higherKinds + trait FoldableToList[F[_]] { self: Foldable[F] => def toList[A](fa: F[A]): List[A] = self.foldLeft(fa, List.empty[A])((xs, x) => x :: xs).reverse From 63fc3c69f4f313023e5da9af9c294387d98d8eb2 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 19 Oct 2016 15:59:02 -0700 Subject: [PATCH 3/4] set sbt options in .sbtopts not only .travis.yml without this I was having trouble running tests locally, for lack of heap --- .sbtopts | 2 ++ .travis.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .sbtopts diff --git a/.sbtopts b/.sbtopts new file mode 100644 index 00000000..b3688c46 --- /dev/null +++ b/.sbtopts @@ -0,0 +1,2 @@ +-J-XX:ReservedCodeCacheSize=256M +-J-Xmx3072M diff --git a/.travis.yml b/.travis.yml index 45ff9092..9650d636 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ env: - TEST_COMMAND="-Dmima.testScalaVersion=2.12.0-RC2 testFunctional" script: - - sbt -J-XX:ReservedCodeCacheSize=256M -J-Xmx3072M $TEST_COMMAND + - sbt $TEST_COMMAND # Tricks to avoid unnecessary cache updates - find $HOME/.sbt -name "*.lock" | xargs rm From bda0165811bc923f23bb61e45aecf6c1d5086395 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 19 Oct 2016 16:03:58 -0700 Subject: [PATCH 4/4] updated expected test results for 2.12.0-RC2 changes fixes com.typesafe.tools.mima.lib.TestFailed on test-class-method-abstract-override-of-concrete-supertrait-method-nok conferred with Adriaan on this. it looks like this is because of the restoration of mixin forwarders in RC2. so we just update the expected output to match the new behavior. (this makes the 2.12 expected output the same as the 2.11 output again, so we just remove the 2.12-specific file.) --- .../problems-2.12.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 reporter/functional-tests/src/test/class-method-abstract-override-of-concrete-supertrait-method-nok/problems-2.12.txt diff --git a/reporter/functional-tests/src/test/class-method-abstract-override-of-concrete-supertrait-method-nok/problems-2.12.txt b/reporter/functional-tests/src/test/class-method-abstract-override-of-concrete-supertrait-method-nok/problems-2.12.txt deleted file mode 100644 index 433e4360..00000000 --- a/reporter/functional-tests/src/test/class-method-abstract-override-of-concrete-supertrait-method-nok/problems-2.12.txt +++ /dev/null @@ -1 +0,0 @@ -in new version there is abstract method foo()Int in class B, which does not have a correspondent