From b785cd58c0994e47d177ed19e96b50b0324ef517 Mon Sep 17 00:00:00 2001 From: "Kai(luo) Wang" Date: Thu, 28 Sep 2017 08:48:55 -0400 Subject: [PATCH] temporarily disable MiMa check on kernel (#1925) * temporarily disable MiMa check on kernel * added duration instance and queue instances to all import * remove trailing ws * use exceptions for kernel binary compat check * added a TODO --- build.sbt | 19 ++++++++++++++++--- .../scala/cats/kernel/laws/LawTests.scala | 3 --- .../scala/cats/kernel/instances/all.scala | 4 ++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/build.sbt b/build.sbt index 0534040300..c4218a63c8 100644 --- a/build.sbt +++ b/build.sbt @@ -233,6 +233,17 @@ lazy val macrosJS = macros.js val binaryCompatibleVersion = "0.8.0" +val binaryCompatibleExceptions = { + import com.typesafe.tools.mima.core._ + import com.typesafe.tools.mima.core.ProblemFilters._ + Seq( //todo: remove these once we release 1.0.0-RC1 + exclude[InheritedNewAbstractMethodProblem]("cats.kernel.instances.QueueInstances.*"), + exclude[InheritedNewAbstractMethodProblem]("cats.kernel.instances.QueueInstances1.*"), + exclude[InheritedNewAbstractMethodProblem]("cats.kernel.instances.QueueInstances2.*"), + exclude[InheritedNewAbstractMethodProblem]("cats.kernel.instances.DurationInstances.*") + ) +} + lazy val kernel = crossProject.crossType(CrossType.Pure) .in(file("kernel")) .settings(moduleName := "cats-kernel", name := "Cats kernel") @@ -242,13 +253,15 @@ lazy val kernel = crossProject.crossType(CrossType.Pure) .settings(sourceGenerators in Compile += (sourceManaged in Compile).map(KernelBoiler.gen).taskValue) .settings(includeGeneratedSrc) .jsSettings(commonJsSettings) - .jvmSettings((commonJvmSettings ++ - (mimaPreviousArtifacts := { + .jvmSettings(commonJvmSettings ++ Seq( + mimaPreviousArtifacts := { if (scalaVersion.value startsWith "2.12") Set() else Set("org.typelevel" %% "cats-kernel" % binaryCompatibleVersion) - }))) + }, + mimaBinaryIssueFilters ++= binaryCompatibleExceptions + )) lazy val kernelJVM = kernel.jvm lazy val kernelJS = kernel.js diff --git a/kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala b/kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala index bd052d2014..3d0a37f138 100644 --- a/kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala +++ b/kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala @@ -6,9 +6,6 @@ import catalysts.macros.TypeTagM import cats.kernel.instances.all._ -// these aren't included in all due to bincompat -import cats.kernel.instances.duration._ -import cats.kernel.instances.queue._ import org.typelevel.discipline.{ Laws } import org.typelevel.discipline.scalatest.Discipline diff --git a/kernel/src/main/scala/cats/kernel/instances/all.scala b/kernel/src/main/scala/cats/kernel/instances/all.scala index 6ac3f0fb84..269a34d9ff 100644 --- a/kernel/src/main/scala/cats/kernel/instances/all.scala +++ b/kernel/src/main/scala/cats/kernel/instances/all.scala @@ -11,7 +11,7 @@ trait AllInstances with ByteInstances with CharInstances with DoubleInstances - // with DurationInstances // left out for bincompat + with DurationInstances with FloatInstances with FunctionInstances with IntInstances @@ -19,7 +19,7 @@ trait AllInstances with LongInstances with MapInstances with OptionInstances - // with QueueInstances // left out for bincompat + with QueueInstances with SetInstances with ShortInstances with StreamInstances