Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enabled mima on master and cleaned up exclusion list #1631

Merged
merged 2 commits into from
Sep 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 8 additions & 42 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -201,56 +201,21 @@ lazy val releaseSettings = Seq(

lazy val mimaSettings = Seq(
mimaPreviousArtifacts := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v >= 13 => Set.empty
case _ =>
previousVersion(version.value).map { pv =>
organization.value % (normalizedName.value + "_" + scalaBinaryVersion.value) % pv
}.toSet
}
List("2.0.0").map { pv =>
organization.value % (normalizedName.value + "_" + scalaBinaryVersion.value) % pv
}.toSet
},
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[Problem]("fs2.package*EitherSyntax*"),
// No bincompat on internal package
ProblemFilters.exclude[Problem]("fs2.internal.*"),
ProblemFilters.exclude[Problem]("fs2.Stream#StepLeg.this"),
ProblemFilters.exclude[Problem]("fs2.concurrent.Publish.*"),
ProblemFilters.exclude[Problem]("fs2.concurrent.Subscribe.*"),
ProblemFilters.exclude[Problem]("fs2.concurrent.PubSub.*"),
// The following changes to the io package were all package private
ProblemFilters
.exclude[DirectMissingMethodProblem]("fs2.io.package.invokeCallback"),
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.io.tcp.Socket.client"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"fs2.io.JavaInputOutputStream.toInputStream"),
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.io.tcp.Socket.server"),
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.io.tcp.Socket.mkSocket"),
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.io.udp.Socket.mkSocket"),
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.Pipe.joinQueued"),
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.Pipe.joinAsync"),
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.Stream.bracketFinalizer"),
// Compiler#apply is private[fs2]
ProblemFilters.exclude[IncompatibleMethTypeProblem]("fs2.Stream#Compiler.apply"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("fs2.Stream#Compiler.apply"),
// bracketWithToken was private[fs2]
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.Stream.bracketWithToken"),
//forStrategy/NoneTerminated were private[fs2]
ProblemFilters.exclude[DirectMissingMethodProblem]("fs2.concurrent.Queue.forStrategy"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"fs2.concurrent.Queue.forStrategyNoneTerminated"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"fs2.concurrent.InspectableQueue.forStrategy")
// Mima reports all ScalaSignature changes as errors, despite the fact that they don't cause bincompat issues when version swapping (see https://github.com/lightbend/mima/issues/361)
ProblemFilters.exclude[IncompatibleSignatureProblem]("*")
)
)

def previousVersion(currentVersion: String): Option[String] = {
val Version = """(\d+)\.(\d+)\.(\d+).*""".r
val Version(x, y, z) = currentVersion
if (z == "0") None
else Some(s"$x.$y.${z.toInt - 1}")
}

lazy val root = project
.in(file("."))
.disablePlugins(MimaPlugin)
.settings(commonSettings)
.settings(mimaSettings)
.settings(noPublish)
Expand Down Expand Up @@ -286,6 +251,7 @@ lazy val coreJVM = core.jvm
osgiSettings
)
.settings(mimaSettings)

lazy val coreJS = core.js.disablePlugins(DoctestPlugin, MimaPlugin)

lazy val io = project
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.9.5")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.5")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11")
addSbtPlugin("io.crashbox" % "sbt-gpg" % "0.2.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.7")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.12")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7")
Expand Down