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

Upgrade MiMa, configure @experimental & curtail filters #14976

Merged
merged 2 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ object Build {
case CompatMode.BinaryCompatible => "backward"
case CompatMode.SourceAndBinaryCompatible => "both"
}),

mimaExcludeAnnotations += "scala.annotation.experimental",
)

/** Projects -------------------------------------------------------------- */
Expand Down
20 changes: 5 additions & 15 deletions project/MiMaFilters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,18 @@ import com.typesafe.tools.mima.core._

object MiMaFilters {
val Library: Seq[ProblemFilter] = Seq(
ProblemFilters.exclude[Problem]("scala.runtime.*"), // KEEP: scala.runtime isn't public API
dwijnand marked this conversation as resolved.
Show resolved Hide resolved

// APIs that must be added in 3.2.0
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.runtime.QuoteUnpickler.unpickleExprV2"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.runtime.QuoteUnpickler.unpickleExprV2"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.runtime.QuoteUnpickler.unpickleTypeV2"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.runtime.QuoteUnpickler.unpickleTypeV2"),

// Experimental APIs that can be added in 3.2.0
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.Tuples.append"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.asQuotes"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#ClassDefModule.apply"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolModule.newClass"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.typeRef"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.termRef"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TypeTreeModule.ref"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#AppliedTypeModule.apply"),

// Experimental `MainAnnotation` APIs. Can be added in 3.3.0 or later.
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.MainAnnotation"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.MainAnnotation$"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.MainAnnotation$Command"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.MainAnnotation$CommandInfo"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.MainAnnotation$ParameterInfo"),
// MiMa bug: classes nested in an experimental object should be ignored
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.MainAnnotation$Info"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.MainAnnotation$Parameter"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.MainAnnotation$ParameterAnnotation"),
)
}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.2")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.9.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0")