Skip to content

Commit

Permalink
Add MiMa (#135)
Browse files Browse the repository at this point in the history
* Add MiMa

* Reduce size in ListTests to match StreamTests
  • Loading branch information
travisbrown authored Oct 29, 2019
1 parent 853249e commit 1558b21
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 9 deletions.
62 changes: 54 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ lazy val root = (project in file("."))

lazy val publish = (project in file("."))
.settings(noPublishSettings)
.disablePlugins(MimaPlugin)
.aggregate(coreJVM, coreJS)
.aggregate(metaJVM, metaJS)
.aggregate(macrosJVM, macrosJS)
Expand All @@ -35,6 +36,7 @@ lazy val V = new {
val algebra = "2.0.0"
val atto = "0.7.1"
val scalacheck = "1.14.2"
val drostePrev = "0.7.0"
}

def paradiseDep(scalaVersion: String): Seq[ModuleID] =
Expand All @@ -48,26 +50,56 @@ def paradiseDep(scalaVersion: String): Seq[ModuleID] =

lazy val meta = module("meta")
.settings(
mimaPreviousArtifacts := Set(
organization.value %%% moduleName.value % V.drostePrev),
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided"))
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided")
)

lazy val metaJVM = meta.jvm
lazy val metaJS = meta.js

lazy val core = module("core")
.dependsOn(meta)
.settings(
mimaPreviousArtifacts := Set(
organization.value %%% moduleName.value % V.drostePrev),
mimaBinaryIssueFilters ++= {
import com.typesafe.tools.mima.core.IncompatibleSignatureProblem
import com.typesafe.tools.mima.core.ProblemFilters.exclude
// See https://github.com/lightbend/mima/issues/423
Seq(
exclude[IncompatibleSignatureProblem](
"higherkindness.droste.Basis#Default.unapply"),
exclude[IncompatibleSignatureProblem](
"higherkindness.droste.GAlgebra#Gathered.unapply"),
exclude[IncompatibleSignatureProblem](
"higherkindness.droste.GAlgebraArrow.algebra"),
exclude[IncompatibleSignatureProblem](
"higherkindness.droste.GAlgebraM#Gathered.unapply"),
exclude[IncompatibleSignatureProblem](
"higherkindness.droste.GCoalgebra#Scattered.unapply"),
exclude[IncompatibleSignatureProblem](
"higherkindness.droste.GCoalgebraArrow.algebra"),
exclude[IncompatibleSignatureProblem](
"higherkindness.droste.GCoalgebraM#Scattered.unapply")
)
},
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % V.cats,
"org.typelevel" %%% "cats-free" % V.cats))
"org.typelevel" %%% "cats-free" % V.cats)
)

lazy val coreJVM = core.jvm
lazy val coreJS = core.js

lazy val macros = module("macros")
.dependsOn(core)
.settings(libraryDependencies ++= paradiseDep(scalaVersion.value))
.settings(
mimaPreviousArtifacts := Set(
organization.value %%% moduleName.value % V.drostePrev),
libraryDependencies ++= paradiseDep(scalaVersion.value))

lazy val macrosJVM = macros.jvm
lazy val macrosJS = macros.js
Expand All @@ -76,30 +108,41 @@ lazy val reftree = module("reftree")
.dependsOn(core)
.settings(noScala213Settings)
.settings(
libraryDependencies ++= Seq("io.github.stanch" %%% "reftree" % "1.2.1"))
mimaPreviousArtifacts := Set(
organization.value %%% moduleName.value % V.drostePrev),
libraryDependencies ++= Seq("io.github.stanch" %%% "reftree" % "1.2.1"))

lazy val reftreeJVM = reftree.jvm
lazy val reftreeJS = reftree.js

lazy val scalacheck = module("scalacheck")
.dependsOn(core)
.settings(libraryDependencies ++= Seq(
"org.scalacheck" %%% "scalacheck" % V.scalacheck))
.settings(
mimaPreviousArtifacts := Set(
organization.value %%% moduleName.value % V.drostePrev),
libraryDependencies ++= Seq(
"org.scalacheck" %%% "scalacheck" % V.scalacheck)
)

lazy val scalacheckJVM = scalacheck.jvm
lazy val scalacheckJS = scalacheck.js

lazy val laws = module("laws")
.dependsOn(core)
.settings(libraryDependencies ++= Seq(
"org.scalacheck" %%% "scalacheck" % V.scalacheck))
.settings(
mimaPreviousArtifacts := Set(
organization.value %%% moduleName.value % V.drostePrev),
libraryDependencies ++= Seq(
"org.scalacheck" %%% "scalacheck" % V.scalacheck)
)

lazy val lawsJVM = laws.jvm
lazy val lawsJS = laws.js

lazy val tests = module("tests")
.dependsOn(core, scalacheck, laws, macros)
.settings(noPublishSettings)
.disablePlugins(MimaPlugin)
.settings(libraryDependencies ++= Seq(
"org.scalacheck" %%% "scalacheck" % V.scalacheck,
"org.typelevel" %%% "cats-laws" % V.cats,
Expand All @@ -114,6 +157,7 @@ lazy val athema = module("athema", prefix = "")
.dependsOn(core)
.settings(noPublishSettings)
.settings(noScala213Settings)
.disablePlugins(MimaPlugin)
.settings(
libraryDependencies ++=
Seq(
Expand All @@ -132,6 +176,7 @@ lazy val readme = (project in file("modules/readme"))
.dependsOn(coreJVM)
.dependsOn(athemaJVM)
.settings(noPublishSettings)
.disablePlugins(MimaPlugin)
.settings(
scalacOptions in Tut ~= {
_.filterNot(
Expand All @@ -152,6 +197,7 @@ lazy val docs = (project in file("docs"))
.settings(noPublishSettings: _*)
.enablePlugins(MicrositesPlugin)
.disablePlugins(ProjectPlugin)
.disablePlugins(MimaPlugin)
.settings(
scalacOptions in Tut ~= (_ filterNot Set("-Ywarn-unused-import", "-Xlint").contains)
)
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ final class ListTests extends Properties("ListTest") {
toList(x)
}
implicit def arbitrary[T](implicit T: Basis[ListF[Int, ?], T]): Arbitrary[T] =
Arbitrary(Gen.resize(50, Gen.listOf(Gen.chooseNum[Int](1, Int.MaxValue))).map(scheme.ana(ListF.fromScalaListCoalgebra[Int])))
Arbitrary(Gen.resize(25, Gen.listOf(Gen.chooseNum[Int](1, Int.MaxValue))).map(scheme.ana(ListF.fromScalaListCoalgebra[Int])))

import ListF._

Expand Down
6 changes: 6 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
resolvers += Resolver.url(
"typesafe sbt-plugins",
url("https://dl.bintray.com/typesafe/sbt-plugins")
)(Resolver.ivyStylePatterns)

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.29")
Expand All @@ -6,3 +11,4 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
addSbtPlugin("io.crashbox" % "sbt-gpg" % "0.2.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.12")
addSbtPlugin("com.47deg" % "sbt-microsites" % "0.9.7")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.1")

0 comments on commit 1558b21

Please sign in to comment.