From 311af1fcc1e89a1330be6421daaa90ceebcb2104 Mon Sep 17 00:00:00 2001 From: Filippo Mariotti Date: Fri, 18 Jan 2019 03:16:36 +0100 Subject: [PATCH 1/2] Reverted binary incompatible changes to generated parallel syntax --- .../src/main/scala/catsBC/MimaExceptions.scala | 3 ++- build.sbt | 18 +----------------- project/Boilerplate.scala | 2 +- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/binCompatTest/src/main/scala/catsBC/MimaExceptions.scala b/binCompatTest/src/main/scala/catsBC/MimaExceptions.scala index e3fcf47d22..420399f0ee 100644 --- a/binCompatTest/src/main/scala/catsBC/MimaExceptions.scala +++ b/binCompatTest/src/main/scala/catsBC/MimaExceptions.scala @@ -26,6 +26,7 @@ object MimaExceptions { cats.data.EitherT.left[Int](Option("err")), true.iterateUntilM(Option(_))(identity _), Either.catchOnly[NumberFormatException] { "foo".toInt }, - (1.validNel[String], 2.validNel[String], 3.validNel[String]) mapN (_ + _ + _) + (1.validNel[String], 2.validNel[String], 3.validNel[String]) mapN (_ + _ + _), + (1.asRight[String], 2.asRight[String], 3.asRight[String]) parMapN (_ + _ + _) ) } diff --git a/build.sbt b/build.sbt index ef8f81d674..dea25fcab5 100644 --- a/build.sbt +++ b/build.sbt @@ -373,26 +373,10 @@ def mimaSettings(moduleName: String) = exclude[MissingTypesProblem]("cats.arrow.FunctionKMacros$"), exclude[IncompatibleMethTypeProblem]("cats.arrow.FunctionKMacros#Lifter.this"), exclude[IncompatibleResultTypeProblem]("cats.arrow.FunctionKMacros#Lifter.c") - ) ++ mimaBoilerplateSyntaxExclusions(scalaVersion.value) + ) } ) -def mimaBoilerplateSyntaxExclusions(scalaVersion: String) = { - import com.typesafe.tools.mima.core._ - import com.typesafe.tools.mima.core.ProblemFilters._ - - Seq( - exclude[IncompatibleResultTypeProblem]("cats.*.catsSyntaxTuple*Parallel") - ) ++ (CrossVersion.partialVersion(scalaVersion) match { - case Some((2, 11)) => - Seq( - exclude[DirectMissingMethodProblem]("cats.syntax.TupleParallelSyntax.catsSyntaxTuple*Parallel"), - exclude[ReversedMissingMethodProblem]("cats.syntax.TupleParallelSyntax.catsSyntaxTuple*Parallel") - ) - case _ => Seq.empty - }) -} - lazy val docs = project .enablePlugins(MicrositesPlugin) .enablePlugins(ScalaUnidocPlugin) diff --git a/project/Boilerplate.scala b/project/Boilerplate.scala index 6719445081..11a99679a5 100644 --- a/project/Boilerplate.scala +++ b/project/Boilerplate.scala @@ -404,7 +404,7 @@ object Boilerplate { - implicit def catsSyntaxTuple${arity}Parallel[M[_], ${`A..N`}]($tupleTpe): Tuple${arity}ParallelOps[M, ${`A..N`}] = new Tuple${arity}ParallelOps(t$arity) |} | - -private[syntax] final class Tuple${arity}ParallelOps[M[_], ${`A..N`}](private val $tupleTpe) extends AnyVal { + -private[syntax] final class Tuple${arity}ParallelOps[M[_], ${`A..N`}]($tupleTpe) { - $parMap - $parTupled -} From 69356efd06c6e82439bcb3a0a893d62728b57f5d Mon Sep 17 00:00:00 2001 From: Filippo Mariotti Date: Sat, 19 Jan 2019 03:14:37 +0100 Subject: [PATCH 2/2] Changed boilerplate syntax ops' parameters private --- project/Boilerplate.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Boilerplate.scala b/project/Boilerplate.scala index 11a99679a5..948bad1975 100644 --- a/project/Boilerplate.scala +++ b/project/Boilerplate.scala @@ -404,7 +404,7 @@ object Boilerplate { - implicit def catsSyntaxTuple${arity}Parallel[M[_], ${`A..N`}]($tupleTpe): Tuple${arity}ParallelOps[M, ${`A..N`}] = new Tuple${arity}ParallelOps(t$arity) |} | - -private[syntax] final class Tuple${arity}ParallelOps[M[_], ${`A..N`}]($tupleTpe) { + -private[syntax] final class Tuple${arity}ParallelOps[M[_], ${`A..N`}](private val $tupleTpe) { - $parMap - $parTupled -} @@ -470,7 +470,7 @@ object Boilerplate { - implicit def catsSyntaxTuple${arity}Semigroupal[F[_], ${`A..N`}]($tupleTpe): Tuple${arity}SemigroupalOps[F, ${`A..N`}] = new Tuple${arity}SemigroupalOps(t$arity) |} | - -private[syntax] final class Tuple${arity}SemigroupalOps[F[_], ${`A..N`}]($tupleTpe) { + -private[syntax] final class Tuple${arity}SemigroupalOps[F[_], ${`A..N`}](private val $tupleTpe) { - $map - $contramap - $imap