Skip to content

Commit dc6d04a

Browse files
authored
Merge pull request #365 from SethTisue/mima-version-in-bincompat-test
use latest MiMa version in binary-compat test
2 parents ec7cdd4 + c013029 commit dc6d04a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

binary-compat/test/src/test/scala/BinaryCompaTest.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ import org.junit.{Assert, Test}
1414

1515
import build.BuildInfo._
1616

17+
import java.io.File
18+
1719
import com.typesafe.tools.mima.lib.MiMaLib
18-
import com.typesafe.tools.mima.core.Config
1920

2021
class BinaryCompaTest {
2122
@Test
2223
def compat(): Unit = {
23-
Config.setup("foo", Array(oldClasspath, newClasspath))
24-
val mima = new MiMaLib(Config.baseClassPath)
25-
val allProblems = mima.collectProblems(oldClasspath, newClasspath)
24+
val mima = new MiMaLib(Seq())
25+
val allProblems = mima.collectProblems(new File(oldClasses), new File(newClasses))
2626
val unexpectedDescriptions =
2727
allProblems.iterator
2828
.map(_.description("new"))
2929
// code improvement: it would be more standard to use a ProblemFilter here
3030
.filterNot(
31-
_ == "static method id(scala.collection.Iterable,scala.collection.generic.CanBuildFrom)scala.collection.Iterable in class org.example.Lib has a different signature in new version, where it is <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<Lscala/runtime/Nothing$;TA;TC;>;)TC; rather than <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<TC;TA;TC;>;)TC;")
31+
_ == "method id(scala.collection.Iterable,scala.collection.generic.CanBuildFrom)scala.collection.Iterable in object org.example.Lib has a different generic signature in new version, where it is <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<Lscala/runtime/Nothing$;TA;TC;>;)TC; rather than <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<TC;TA;TC;>;)TC;. See https://github.com/lightbend/mima#incompatiblesignatureproblem")
3232
.filterNot(
33-
_ == "method id(scala.collection.Iterable,scala.collection.generic.CanBuildFrom)scala.collection.Iterable in object org.example.Lib has a different signature in new version, where it is <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<Lscala/runtime/Nothing$;TA;TC;>;)TC; rather than <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<TC;TA;TC;>;)TC;")
33+
_ == "static method id(scala.collection.Iterable,scala.collection.generic.CanBuildFrom)scala.collection.Iterable in class org.example.Lib has a different generic signature in new version, where it is <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<Lscala/runtime/Nothing$;TA;TC;>;)TC; rather than <A:Ljava/lang/Object;C::Lscala/collection/Iterable<Ljava/lang/Object;>;>(TC;Lscala/collection/generic/CanBuildFrom<TC;TA;TC;>;)TC;. See https://github.com/lightbend/mima#incompatiblesignatureproblem")
3434
.toList
3535
val msg =
3636
unexpectedDescriptions.mkString(

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ lazy val `binary-compat` = project
127127
.settings(commonSettings)
128128
.settings(
129129
scalaVersion := scala212,
130-
libraryDependencies += "com.typesafe" %% "mima-core" % "0.6.1" % Test,
130+
libraryDependencies += "com.typesafe" %% "mima-core" % "0.8.0" % Test,
131131
junit,
132132
buildInfoPackage := "build",
133133
buildInfoKeys := Seq[BuildInfoKey](
134-
"oldClasspath" -> (classDirectory in (`binary-compat-old`, Compile)).value.toString,
135-
"newClasspath" -> (classDirectory in (`binary-compat-new`, Compile)).value.toString
134+
"oldClasses" -> (classDirectory in (`binary-compat-old`, Compile)).value.toString,
135+
"newClasses" -> (classDirectory in (`binary-compat-new`, Compile)).value.toString
136136
),
137137
test in Test := (test in Test)
138138
.dependsOn(

0 commit comments

Comments
 (0)