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

Add error-handling methods to EitherT #2237

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
31 changes: 27 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import microsites._
import ReleaseTransformations._
import com.typesafe.tools.mima.core.{MissingClassProblem, ProblemFilters, ReversedMissingMethodProblem}

import scala.xml.transform.{RewriteRule, RuleTransformer}
import org.scalajs.sbtplugin.cross.CrossProject

Expand Down Expand Up @@ -213,9 +215,30 @@ lazy val docSettings = Seq(

lazy val binaryCompatibleVersion = "1.0.0"

def mimaSettings(moduleName: String) = Seq(
mimaPreviousArtifacts := Set("org.typelevel" %% moduleName % binaryCompatibleVersion)
)
def mimaSettings(moduleName: String) =
Seq(
mimaPreviousArtifacts := Set("org.typelevel" %% moduleName % binaryCompatibleVersion),
mimaBinaryIssueFilters ++= (moduleName match {
case "cats-core" =>
Seq(
// Internal classes, moved due to refactoring, not a problem
ProblemFilters.exclude[MissingClassProblem]("cats.syntax.EitherUtil$"),
ProblemFilters.exclude[MissingClassProblem]("cats.syntax.EitherUtil"),
// Scala 2.11 only — internal classes, not a problem
ProblemFilters.exclude[ReversedMissingMethodProblem]("cats.data.EitherTMonadErrorF.redeem"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("cats.data.EitherTMonadErrorF.redeemWith"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("cats.data.EitherTMonadErrorF.handleError"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("cats.data.EitherTMonadErrorF.attempt"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("cats.data.EitherTMonadError.redeem"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("cats.data.EitherTMonadError.redeemWith"),
// BREAKAGE — Scala 2.11 only!
ProblemFilters.exclude[ReversedMissingMethodProblem]("cats.MonadError.redeem"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("cats.MonadError.redeemWith")
)
case _ =>
Seq.empty
})
)

lazy val docs = project
.enablePlugins(MicrositesPlugin)
Expand Down Expand Up @@ -305,7 +328,7 @@ lazy val core = crossProject.crossType(CrossType.Pure)
.configureCross(disableScoverage210Js)
.settings(libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalaCheckVersion % "test")
.jsSettings(commonJsSettings)
.jvmSettings(commonJvmSettings ++ mimaSettings("cats-core") )
.jvmSettings(commonJvmSettings ++ mimaSettings("cats-core"))

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