Skip to content

Commit

Permalink
Merge pull request #768 from OlegYch/fix-767
Browse files Browse the repository at this point in the history
Restore binary compatibility with 2.9
  • Loading branch information
mergify[bot] authored Jun 10, 2022
2 parents 2079b35 + 0c505fb commit f2918b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,14 @@ def playJsonMimaSettings = Seq(
mimaPreviousArtifacts := ((crossProjectPlatform.?.value, previousStableVersion.value) match {
case _ if isScala3.value => Set.empty // no releases for Scala 3 yet
case (Some(JSPlatform), Some("2.8.1")) => Set.empty
case (_, Some(previousVersion)) => Set(organization.value %%% moduleName.value % previousVersion)
case _ => throw new Error("Unable to determine previous version")
case (_, Some(previousVersion)) =>
val stableVersion = if (previousVersion.startsWith("2.10.0-RC")) "2.9.2" else previousVersion
Set(organization.value %%% moduleName.value % stableVersion)
case _ => throw new Error("Unable to determine previous version")
}),
mimaBinaryIssueFilters ++= Seq(
// MergedOWrites is private
ProblemFilters.exclude[Problem]("play.api.libs.json.OWrites#MergedOWrites*"),
// [error] * method unapply(play.api.libs.json.JsBoolean)scala.Option in object play.api.libs.json.JsBoolean has a different result type in current version, where it is scala.Some rather than scala.Option
// [error] * static method unapply(play.api.libs.json.JsBoolean)scala.Option in class play.api.libs.json.JsBoolean has a different result type in current version, where it is scala.Some rather than scala.Option
// Some is a subtype, which is safe because return types are covariant.
ProblemFilters.exclude[IncompatibleResultTypeProblem]("play.api.libs.json.JsBoolean.unapply"),
// [error] * in current version, classes mixing play.api.libs.json.DefaultWrites need be recompiled to wire to the new static mixin forwarder method all super calls to method enumNameWrites()play.api.libs.json.Writes
// Despite not being `sealed` or documented, I don't think DefaultWrites was intended to be extended by users.
ProblemFilters.exclude[NewMixinForwarderProblem]("play.api.libs.json.DefaultWrites.enumNameWrites"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ case object JsFalse extends JsBoolean(false)
object JsBoolean extends (Boolean => JsBoolean) {
def apply(value: Boolean): JsBoolean = if (value) JsTrue else JsFalse

def unapply(b: JsBoolean): Some[Boolean] = Some(b.value)
def unapply(b: JsBoolean): Option[Boolean] = Some(b.value)
}

/**
Expand Down

0 comments on commit f2918b0

Please sign in to comment.