Skip to content

Commit

Permalink
=pro verify BC against all binary compatible versions
Browse files Browse the repository at this point in the history
  • Loading branch information
2m committed Oct 23, 2015
1 parent a6279b7 commit 4ffe267
Show file tree
Hide file tree
Showing 24 changed files with 56 additions and 63 deletions.
2 changes: 1 addition & 1 deletion akka-actor/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion akka-agent/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ OSGi.agent

Dependencies.agent

MimaKeys.previousArtifact := akkaPreviousArtifact("akka-agent").value
MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-agent").value

enablePlugins(ScaladocNoVerificationOfDiagrams)
2 changes: 1 addition & 1 deletion akka-camel/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ OSGi.camel

Dependencies.camel

MimaKeys.previousArtifact := akkaPreviousArtifact("akka-camel").value
MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-camel").value
2 changes: 1 addition & 1 deletion akka-cluster-metrics/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion akka-cluster-sharding/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion akka-cluster-tools/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion akka-cluster/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions akka-contrib/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions akka-distributed-data/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)


2 changes: 0 additions & 2 deletions akka-docs/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion akka-kernel/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Formatting.formatSettings

Dependencies.kernel

MimaKeys.previousArtifact := akkaPreviousArtifact("akka-kernel").value
MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-kernel").value

enablePlugins(ScaladocNoVerificationOfDiagrams)
2 changes: 1 addition & 1 deletion akka-multi-node-testkit/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ AkkaBuild.defaultSettings

Formatting.formatSettings

MimaKeys.previousArtifact := akkaPreviousArtifact("akka-multi-node-testkit").value
MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-multi-node-testkit").value
2 changes: 0 additions & 2 deletions akka-osgi/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ OSGi.osgi
Dependencies.osgi

parallelExecution in Test := false

MimaKeys.reportBinaryIssues := () // disable bin comp check
2 changes: 1 addition & 1 deletion akka-persistence-query/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions akka-persistence-tck/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ Formatting.formatSettings

Dependencies.persistenceTck

MimaKeys.previousArtifact := None

fork in Test := true
2 changes: 1 addition & 1 deletion akka-persistence/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ OSGi.persistence

Dependencies.persistence

MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence").value
MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-persistence").value

fork in Test := true
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 0 additions & 2 deletions akka-remote-tests/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ parallelExecution in Test := false

publishArtifact in Compile := false

MimaKeys.reportBinaryIssues := () // disable bin comp check

enablePlugins(MultiNodeScalaTest)

AkkaBuild.dontPublishSettings
2 changes: 1 addition & 1 deletion akka-remote/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Dependencies.remote

parallelExecution in Test := false

MimaKeys.previousArtifact := akkaPreviousArtifact("akka-remote").value
MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-remote").value
2 changes: 1 addition & 1 deletion akka-slf4j/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ OSGi.slf4j

Dependencies.slf4j

MimaKeys.previousArtifact := akkaPreviousArtifact("akka-slf4j").value
MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-slf4j").value
2 changes: 1 addition & 1 deletion akka-testkit/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Dependencies.testkit

initialCommands += "import akka.testkit._"

MimaKeys.previousArtifact := akkaPreviousArtifact("akka-testkit").value
MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-testkit").value
29 changes: 20 additions & 9 deletions project/AkkaBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down Expand Up @@ -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 = {
Expand Down
39 changes: 16 additions & 23 deletions project/MiMa.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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._

Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand All @@ -553,30 +548,28 @@ 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"),
FilterAnyProblemStartingWith("akka.remote.serialization.DaemonMsgCreateSerializer"),
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"))
)
}
}
5 changes: 3 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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"

Expand Down

0 comments on commit 4ffe267

Please sign in to comment.