From 4ffe2678350da76a67eee683565cc8c7224f88f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Mickevi=C4=8Dius?= Date: Fri, 23 Oct 2015 09:10:25 +0300 Subject: [PATCH] =pro verify BC against all binary compatible versions --- akka-actor/build.sbt | 2 +- akka-agent/build.sbt | 2 +- akka-camel/build.sbt | 2 +- akka-cluster-metrics/build.sbt | 2 +- akka-cluster-sharding/build.sbt | 2 +- akka-cluster-tools/build.sbt | 2 +- akka-cluster/build.sbt | 2 +- akka-contrib/build.sbt | 2 - akka-distributed-data/build.sbt | 4 +- akka-docs/build.sbt | 2 - akka-kernel/build.sbt | 2 +- akka-multi-node-testkit/build.sbt | 2 +- akka-osgi/build.sbt | 2 - akka-persistence-query/build.sbt | 2 +- akka-persistence-tck/build.sbt | 2 - akka-persistence/build.sbt | 2 +- .../journal/AsyncWriteJournal.scala | 4 +- akka-remote-tests/build.sbt | 2 - akka-remote/build.sbt | 2 +- akka-slf4j/build.sbt | 2 +- akka-testkit/build.sbt | 2 +- project/AkkaBuild.scala | 29 +++++++++----- project/MiMa.scala | 39 ++++++++----------- project/plugins.sbt | 5 ++- 24 files changed, 56 insertions(+), 63 deletions(-) diff --git a/akka-actor/build.sbt b/akka-actor/build.sbt index 6a91adc89b9..d3936eac51e 100644 --- a/akka-actor/build.sbt +++ b/akka-actor/build.sbt @@ -9,6 +9,6 @@ OSGi.actor Dependencies.actor -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-actor").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-actor").value spray.boilerplate.BoilerplatePlugin.Boilerplate.settings diff --git a/akka-agent/build.sbt b/akka-agent/build.sbt index cab4a1ca799..9c28a819fc0 100644 --- a/akka-agent/build.sbt +++ b/akka-agent/build.sbt @@ -9,6 +9,6 @@ OSGi.agent Dependencies.agent -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-agent").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-agent").value enablePlugins(ScaladocNoVerificationOfDiagrams) diff --git a/akka-camel/build.sbt b/akka-camel/build.sbt index 08bed3366b4..8e331cf360b 100644 --- a/akka-camel/build.sbt +++ b/akka-camel/build.sbt @@ -9,4 +9,4 @@ OSGi.camel Dependencies.camel -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-camel").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-camel").value diff --git a/akka-cluster-metrics/build.sbt b/akka-cluster-metrics/build.sbt index 9039bf19396..02b421c41fe 100644 --- a/akka-cluster-metrics/build.sbt +++ b/akka-cluster-metrics/build.sbt @@ -12,7 +12,7 @@ OSGi.clusterMetrics Dependencies.clusterMetrics -//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-metrics").value +//MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-cluster-metrics").value parallelExecution in Test := false diff --git a/akka-cluster-sharding/build.sbt b/akka-cluster-sharding/build.sbt index 401da39b85b..fb28b2b12d1 100644 --- a/akka-cluster-sharding/build.sbt +++ b/akka-cluster-sharding/build.sbt @@ -9,6 +9,6 @@ OSGi.clusterSharding Dependencies.clusterSharding -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-sharding").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-cluster-sharding").value enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams) diff --git a/akka-cluster-tools/build.sbt b/akka-cluster-tools/build.sbt index 1a10f69d96c..a37e55c38b0 100644 --- a/akka-cluster-tools/build.sbt +++ b/akka-cluster-tools/build.sbt @@ -9,6 +9,6 @@ OSGi.clusterTools Dependencies.clusterTools -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-tools").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-cluster-tools").value enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams) diff --git a/akka-cluster/build.sbt b/akka-cluster/build.sbt index 827f720f00a..d367586735d 100644 --- a/akka-cluster/build.sbt +++ b/akka-cluster/build.sbt @@ -10,7 +10,7 @@ OSGi.cluster Dependencies.cluster -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-cluster").value // disable parallel tests parallelExecution in Test := false diff --git a/akka-contrib/build.sbt b/akka-contrib/build.sbt index 48e6b166d49..12cf2bffd3a 100644 --- a/akka-contrib/build.sbt +++ b/akka-contrib/build.sbt @@ -9,8 +9,6 @@ OSGi.contrib Dependencies.contrib -MimaKeys.reportBinaryIssues := () // disable bin comp check - description := """| |This subproject provides a home to modules contributed by external |developers which may or may not move into the officially supported code diff --git a/akka-distributed-data/build.sbt b/akka-distributed-data/build.sbt index ecd4ff67e2e..713077ecabc 100644 --- a/akka-distributed-data/build.sbt +++ b/akka-distributed-data/build.sbt @@ -11,8 +11,6 @@ OSGi.distributedData Dependencies.distributedData -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-distributed-data-experimental").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-distributed-data-experimental").value enablePlugins(MultiNodeScalaTest) - - diff --git a/akka-docs/build.sbt b/akka-docs/build.sbt index eed02d02aee..fb17672f14b 100644 --- a/akka-docs/build.sbt +++ b/akka-docs/build.sbt @@ -25,8 +25,6 @@ Dependencies.docs unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test -MimaKeys.reportBinaryIssues := () // disable bin comp check - additionalTasks in ValidatePR += generate in Sphinx AkkaBuild.dontPublishSettings \ No newline at end of file diff --git a/akka-kernel/build.sbt b/akka-kernel/build.sbt index f0c6a042f7a..0918654e528 100644 --- a/akka-kernel/build.sbt +++ b/akka-kernel/build.sbt @@ -7,6 +7,6 @@ Formatting.formatSettings Dependencies.kernel -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-kernel").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-kernel").value enablePlugins(ScaladocNoVerificationOfDiagrams) diff --git a/akka-multi-node-testkit/build.sbt b/akka-multi-node-testkit/build.sbt index d4682761dcd..1df17541758 100644 --- a/akka-multi-node-testkit/build.sbt +++ b/akka-multi-node-testkit/build.sbt @@ -5,4 +5,4 @@ AkkaBuild.defaultSettings Formatting.formatSettings -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-multi-node-testkit").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-multi-node-testkit").value diff --git a/akka-osgi/build.sbt b/akka-osgi/build.sbt index a47e82d6930..e80269b856d 100644 --- a/akka-osgi/build.sbt +++ b/akka-osgi/build.sbt @@ -10,5 +10,3 @@ OSGi.osgi Dependencies.osgi parallelExecution in Test := false - -MimaKeys.reportBinaryIssues := () // disable bin comp check diff --git a/akka-persistence-query/build.sbt b/akka-persistence-query/build.sbt index 74f07a4553e..1da8a5905a6 100644 --- a/akka-persistence-query/build.sbt +++ b/akka-persistence-query/build.sbt @@ -11,7 +11,7 @@ OSGi.persistenceQuery Dependencies.persistenceQuery -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence-query-experimental").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-persistence-query-experimental").value enablePlugins(ScaladocNoVerificationOfDiagrams) diff --git a/akka-persistence-tck/build.sbt b/akka-persistence-tck/build.sbt index a2c563926f3..8beb366b280 100644 --- a/akka-persistence-tck/build.sbt +++ b/akka-persistence-tck/build.sbt @@ -9,6 +9,4 @@ Formatting.formatSettings Dependencies.persistenceTck -MimaKeys.previousArtifact := None - fork in Test := true diff --git a/akka-persistence/build.sbt b/akka-persistence/build.sbt index cb94e7099f1..8f25bd04cc6 100644 --- a/akka-persistence/build.sbt +++ b/akka-persistence/build.sbt @@ -9,6 +9,6 @@ OSGi.persistence Dependencies.persistence -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-persistence").value fork in Test := true diff --git a/akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteJournal.scala b/akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteJournal.scala index ff36fc9723f..47c74667aa1 100644 --- a/akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteJournal.scala +++ b/akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteJournal.scala @@ -208,11 +208,11 @@ trait AsyncWriteJournal extends Actor with WriteJournalBase with AsyncRecovery { * * Calls to this method are serialized by the enclosing journal actor. If you spawn * work in asyncronous tasks it is alright that they complete the futures in any order, - * but the actual writes for a specific persistenceId should be serialized to avoid + * but the actual writes for a specific persistenceId should be serialized to avoid * issues such as events of a later write are visible to consumers (query side, or replay) * before the events of an earlier write are visible. This can also be done with * consistent hashing if it is too fine grained to do it on the persistenceId level. - * Normally a `PersistentActor` will only have one outstanding write request to the journal but + * Normally a `PersistentActor` will only have one outstanding write request to the journal but * it may emit several write requests when `persistAsync` is used and the max batch size * is reached. * diff --git a/akka-remote-tests/build.sbt b/akka-remote-tests/build.sbt index 2d2881ff933..9c26c5b390a 100644 --- a/akka-remote-tests/build.sbt +++ b/akka-remote-tests/build.sbt @@ -13,8 +13,6 @@ parallelExecution in Test := false publishArtifact in Compile := false -MimaKeys.reportBinaryIssues := () // disable bin comp check - enablePlugins(MultiNodeScalaTest) AkkaBuild.dontPublishSettings \ No newline at end of file diff --git a/akka-remote/build.sbt b/akka-remote/build.sbt index 524e0ee1e6e..ed62d78e6c1 100644 --- a/akka-remote/build.sbt +++ b/akka-remote/build.sbt @@ -11,4 +11,4 @@ Dependencies.remote parallelExecution in Test := false -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-remote").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-remote").value diff --git a/akka-slf4j/build.sbt b/akka-slf4j/build.sbt index a5c5db81974..76e7f1fe479 100644 --- a/akka-slf4j/build.sbt +++ b/akka-slf4j/build.sbt @@ -9,4 +9,4 @@ OSGi.slf4j Dependencies.slf4j -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-slf4j").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-slf4j").value diff --git a/akka-testkit/build.sbt b/akka-testkit/build.sbt index 3c9a54410bd..0b4f84f8b05 100644 --- a/akka-testkit/build.sbt +++ b/akka-testkit/build.sbt @@ -12,4 +12,4 @@ Dependencies.testkit initialCommands += "import akka.testkit._" -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-testkit").value +MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-testkit").value diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 935b17a2dcd..fc129265b95 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -53,7 +53,7 @@ object AkkaBuild extends Build { samplePersistenceJava, samplePersistenceScala, samplePersistenceJavaLambda, sampleRemoteJava, sampleRemoteScala, sampleSupervisionJavaLambda, sampleDistributedDataScala, sampleDistributedDataJava), - + S3.host in S3.upload := "downloads.typesafe.com.s3.amazonaws.com", S3.progress in S3.upload := true, mappings in S3.upload <<= (Release.releaseDirectory, version) map { (d, v) => @@ -404,17 +404,28 @@ object AkkaBuild extends Build { mavenLocalResolverSettings ++ JUnitFileReporting.settings ++ StatsDMetrics.settings - def akkaPreviousArtifact(id: String): Def.Initialize[Option[sbt.ModuleID]] = Def.setting { + def akkaPreviousArtifacts(id: String): Def.Initialize[Set[sbt.ModuleID]] = Def.setting { if (enableMiMa) { - val version: String = "2.4.0" // FIXME verify all 2.3.x versions - val fullId = crossVersion.value match { - case _ : CrossVersion.Binary => id + "_" + scalaBinaryVersion.value - case _ : CrossVersion.Full => id + "_" + scalaVersion.value - case CrossVersion.Disabled => id + val versions = { + val akka23Versions = Seq("2.3.11", "2.3.12", "2.3.13", "2.3.14") + val akka24Versions = Seq("2.4.0") + val akka24NewArtifacts = Seq( + "akka-cluster-sharding", + "akka-cluster-tools", + "akka-persistence", + "akka-distributed-data-experimental", + "akka-persistence-query-experimental" + ) + scalaBinaryVersion.value match { + case "2.11" if !akka24NewArtifacts.contains(id) => akka23Versions ++ akka24Versions + case _ => akka24Versions // Only Akka 2.4.x for scala > than 2.11 + } } - Some(organization.value % fullId % version) // the artifact to compare binary compatibility with + + // check against all binary compatible artifacts + versions.map(organization.value %% id % _).toSet } - else None + else Set.empty } def loadSystemProperties(fileName: String): Unit = { diff --git a/project/MiMa.scala b/project/MiMa.scala index 348dc4e2134..1103f081a9f 100644 --- a/project/MiMa.scala +++ b/project/MiMa.scala @@ -3,7 +3,7 @@ */ package akka -import com.typesafe.tools.mima.plugin.MimaKeys.{binaryIssueFilters, previousArtifact} +import com.typesafe.tools.mima.plugin.MimaKeys.{bbcIssueFilters, previousArtifacts} import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings import sbt._ @@ -12,8 +12,8 @@ object MiMa extends AutoPlugin { override def trigger = allRequirements override val projectSettings = mimaDefaultSettings ++ Seq( - previousArtifact := None, - binaryIssueFilters ++= mimaIgnoredProblems + previousArtifacts := Set.empty, + bbcIssueFilters ++= mimaIgnoredProblems ) case class FilterAnyProblem(name: String) extends com.typesafe.tools.mima.core.ProblemFilter { @@ -23,7 +23,7 @@ object MiMa extends AutoPlugin { case m: MemberProblem => m.ref.owner.fullName != name && m.ref.owner.fullName != (name + '$') } } - + case class FilterAnyProblemStartingWith(start: String) extends com.typesafe.tools.mima.core.ProblemFilter { import com.typesafe.tools.mima.core._ override def apply(p: Problem): Boolean = p match { @@ -34,12 +34,8 @@ object MiMa extends AutoPlugin { val mimaIgnoredProblems = { import com.typesafe.tools.mima.core._ - Seq( - FilterAnyProblem("akka.remote.transport.ProtocolStateActor")) - - // FIXME somehow we must use different filters when akkaPreviousArtifact is 2.3.x - /* Below are the filters we used when comparing to 2.3.x - Seq( + + val bcIssuesBetween23and24 = Seq( FilterAnyProblem("akka.remote.testconductor.Terminate"), FilterAnyProblem("akka.remote.testconductor.TerminateMsg"), ProblemFilters.exclude[MissingMethodProblem]("akka.remote.testconductor.Conductor.shutdown"), @@ -433,7 +429,7 @@ object MiMa extends AutoPlugin { // method nrOfInstances(akka.actor.ActorSystem) in trait akka.routing.Pool does not have a correspondent in old version // ok to exclude, since we don't call nrOfInstances(sys) for old implementations ProblemFilters.exclude[MissingMethodProblem]("akka.routing.Pool.nrOfInstances"), - + // method paths(akka.actor.ActorSystem) in trait akka.routing.Group does not have a correspondent in old version // ok to exclude, since we don't call paths(sys) for old implementations ProblemFilters.exclude[MissingMethodProblem]("akka.routing.Group.paths"), @@ -544,7 +540,6 @@ object MiMa extends AutoPlugin { // issue #17554 ProblemFilters.exclude[MissingMethodProblem]("akka.remote.ReliableDeliverySupervisor.maxResendRate"), ProblemFilters.exclude[MissingMethodProblem]("akka.remote.ReliableDeliverySupervisor.resendLimit"), - //changes introduced by #16911 ProblemFilters.exclude[MissingMethodProblem]("akka.remote.RemoteActorRefProvider.afterSendSystemMessage"), FilterAnyProblem("akka.remote.RemoteWatcher"), @@ -553,18 +548,10 @@ object MiMa extends AutoPlugin { FilterAnyProblem("akka.remote.RemoteWatcher$Rewatch"), FilterAnyProblem("akka.remote.RemoteWatcher$RewatchRemote"), FilterAnyProblem("akka.remote.RemoteWatcher$Stats"), - - // toString is available on any object, mima is confused due to a generated toString appearing #17722 - ProblemFilters.exclude[MissingMethodProblem]("akka.japi.Pair.toString"), - - // #17805 - ProblemFilters.exclude[MissingMethodProblem]("akka.actor.ActorCell.clearActorFields"), - // internal changes introduced by #17253 ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.cluster.ClusterDaemon.coreSupervisor"), ProblemFilters.exclude[MissingMethodProblem]("akka.cluster.ClusterCoreSupervisor.publisher"), ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.cluster.ClusterCoreSupervisor.coreDaemon"), - // protofbuf embedding #13783 FilterAnyProblemStartingWith("akka.remote.WireFormats"), FilterAnyProblemStartingWith("akka.remote.ContainerFormats"), @@ -572,11 +559,17 @@ object MiMa extends AutoPlugin { FilterAnyProblemStartingWith("akka.remote.testconductor.TestConductorProtocol"), FilterAnyProblemStartingWith("akka.cluster.protobuf.msg.ClusterMessages"), FilterAnyProblemStartingWith("akka.cluster.protobuf.ClusterMessageSerializer"), - // #13584 change in internal actor ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.cluster.ClusterCoreDaemon.akka$cluster$ClusterCoreDaemon$$isJoiningToUp$1") + ) - ) - */ + Map( + "2.3.11" -> Seq( + ProblemFilters.exclude[MissingMethodProblem]("akka.actor.ActorCell.clearActorFields"), // #17805, incomatibility with 2.4.x fixed in 2.3.12 + ProblemFilters.exclude[MissingMethodProblem]("akka.japi.Pair.toString") // reported on PR validation machine which uses Java 1.8.0_45 + ), + "2.3.14" -> bcIssuesBetween23and24, + "2.4.0" -> Seq(FilterAnyProblem("akka.remote.transport.ProtocolStateActor")) + ) } } diff --git a/project/plugins.sbt b/project/plugins.sbt index 985b018388a..9cf577f58c7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -17,7 +17,8 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.7.1") addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.7") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.7-32-g3bebac4") +resolvers += Resolver.url("2m-sbt-plugins", url("https://dl.bintray.com/2m/sbt-plugins/"))(Resolver.ivyStylePatterns) addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") @@ -35,7 +36,7 @@ libraryDependencies += "com.timgroup" % "java-statsd-client" % "2.0.0" addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0-RC1") // for advanced PR validation features -addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4") +addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.5") libraryDependencies += "org.kohsuke" % "github-api" % "1.68"