Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 12 additions & 1 deletion project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ object Common extends AutoPlugin {
scalacOptions ++= onlyOnScala33(Seq("-Yfuture-lazy-vals")).value,
javacOptions ++=
Seq("-encoding", "UTF-8", "--release", javacTarget),
mimaReportSignatureProblems := true,
Compile / doc / scalacOptions --= Seq("-Xfatal-warnings"),
Global / parallelExecution := sys.props.getOrElse("pekko.http.parallelExecution", "true") != "false")

Expand All @@ -99,3 +98,15 @@ object Common extends AutoPlugin {
def scalaMinorVersion: Def.Initialize[Long] = Def.setting { CrossVersion.partialVersion(scalaVersion.value).get._2 }

}

/**
* Scala 3 emits different generic signatures than Scala 2.13 (and they change between
* Scala 3 patch releases), so only report signature problems for Scala 2.13.
* Requires the sbt-pekko-build MiMa plugin so that this overrides its `mimaReportSignatureProblems := true`.
*/
object MiMaSignatureProblems extends AutoPlugin {
override def requires = com.github.pjfanning.pekkobuild.MiMa
override def trigger: PluginTrigger = allRequirements
override lazy val projectSettings = Seq(
mimaReportSignatureProblems := !scalaVersion.value.startsWith("3"))
}
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object Dependencies {
val scalafixVersion = _root_.scalafix.sbt.BuildInfo.scalafixVersion // grab from plugin

val scala213Version = "2.13.18"
val scala3Version = "3.3.8"
val scala3Version = "3.3.9"
val scala3NextVersion = "3.9.0"
val publishedScalaVersions = Seq(scala213Version, scala3Version)

Expand Down
7 changes: 6 additions & 1 deletion project/ValidatePullRequest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,11 @@ object MimaWithPrValidation extends AutoPlugin {
(stringWriter.toString, result)
}

val reportSignatureProblems = mimaReportSignatureProblems.value
def reportable(problems: List[core.Problem]): List[core.Problem] =
if (reportSignatureProblems) problems
else problems.filterNot(_.isInstanceOf[core.IncompatibleSignatureProblem])

val allResults =
mimaPreviousClassfiles.value.toSeq.map {
case (moduleId, file) =>
Expand All @@ -605,7 +610,7 @@ object MimaWithPrValidation extends AutoPlugin {
withLogger { logger =>
reportModuleErrors(
moduleId,
problems._1, problems._2,
reportable(problems._1), reportable(problems._2),
binary,
backward,
forward,
Expand Down
Loading