Skip to content

Commit

Permalink
chore: Ignore mima filters and disable for now for munit-diff
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Apr 24, 2024
1 parent c5ce308 commit 25ce89f
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 76 deletions.
79 changes: 3 additions & 76 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.typesafe.tools.mima.core._
import sbtcrossproject.CrossPlugin.autoImport.crossProject
import sbtcrossproject.CrossPlugin.autoImport.CrossType
import scala.collection.mutable
Expand Down Expand Up @@ -66,81 +65,7 @@ def isScala3(v: Option[(Long, Long)]): Boolean = v.exists(_._1 == 3)
lazy val skipIdeaSettings =
SettingKey[Boolean]("ide-skip-project").withRank(KeyRanks.Invisible) := true
lazy val mimaEnable: List[Def.Setting[_]] = List(
mimaBinaryIssueFilters ++= List(
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.MUnitRunner.descriptions"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.MUnitRunner.testNames"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.MUnitRunner.munitTests"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.ValueTransforms.munitTimeout"
),
ProblemFilters.exclude[MissingTypesProblem]("munit.FailException"),
ProblemFilters.exclude[MissingTypesProblem]("munit.FailSuiteException"),
ProblemFilters.exclude[MissingTypesProblem](
"munit.TestValues$FlakyFailure"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.internal.junitinterface.JUnitComputer.this"
),
// Known breaking changes for MUnit v1
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.Assertions.assertNotEquals"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.Assertions.assertEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.Assertions.assertNotEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.Assertions.assertEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.FunSuite.assertNotEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.FunSuite.assertEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.FunSuite.munitTestTransform"
),
ProblemFilters.exclude[MissingClassProblem]("munit.GenericAfterEach"),
ProblemFilters.exclude[MissingClassProblem]("munit.GenericBeforeEach"),
ProblemFilters.exclude[MissingClassProblem]("munit.GenericTest"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.MUnitRunner.createTestDescription"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.Suite.beforeEach"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.Suite.afterEach"
),
ProblemFilters.exclude[MissingClassProblem]("munit.Suite$Fixture"),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.TestTransforms#TestTransform.apply"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.FunFixtures#FunFixture.this"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.SuiteTransforms#SuiteTransform.this"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.TestTransforms#TestTransform.this"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.ValueTransforms#ValueTransform.this"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.ScalaCheckSuite.unitToProp"
)
),
mimaBinaryIssueFilters ++= MimaExclusions.list,
mimaPreviousArtifacts := {
if (crossPaths.value)
Set("org.scalameta" %% moduleName.value % previousVersion)
Expand Down Expand Up @@ -293,6 +218,8 @@ lazy val munitDiff = crossProject(JSPlatform, JVMPlatform, NativePlatform)
)
.jsConfigure(sharedJSConfigure)
.jsSettings(sharedJSSettings)
// TODO Reenable on 1.0.0
.disablePlugins(MimaPlugin)

lazy val tests = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.dependsOn(munit)
Expand Down
173 changes: 173 additions & 0 deletions project/MimaExclusions.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
import com.typesafe.tools.mima.core._

object MimaExclusions {

val list = List(
ProblemFilters.exclude[MissingClassProblem]("munit.EmptyPrinter"),
ProblemFilters.exclude[MissingClassProblem]("munit.EmptyPrinter$"),
ProblemFilters.exclude[MissingClassProblem]("munit.Printer"),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.console.AnsiColors"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.console.AnsiColors$"
),
ProblemFilters.exclude[IncompatibleResultTypeProblem](
"munit.internal.console.Printers.print$default$2"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.internal.console.Printers.print"
),
ProblemFilters.exclude[IncompatibleResultTypeProblem](
"munit.internal.console.Printers.log$default$2"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.internal.console.Printers.log"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.internal.console.Printers.log"
),
ProblemFilters.exclude[IncompatibleResultTypeProblem](
"munit.internal.console.Printers.log$default$2"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.internal.console.Printers.print"
),
ProblemFilters.exclude[IncompatibleResultTypeProblem](
"munit.internal.console.Printers.print$default$2"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.ChangeDelta"
),
ProblemFilters.exclude[MissingClassProblem]("munit.internal.difflib.Chunk"),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.DeleteDelta"
),
ProblemFilters.exclude[MissingClassProblem]("munit.internal.difflib.Delta"),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.Delta$TYPE"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.Delta$TYPE$"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.Delta$TYPE$CHANGE$"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.Delta$TYPE$DELETE$"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.Delta$TYPE$INSERT$"
),
ProblemFilters.exclude[MissingClassProblem]("munit.internal.difflib.Diff"),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.DiffAlgorithm"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.DiffNode"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.DiffUtils"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.DiffUtils$"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.DifferentiationFailedException"
),
ProblemFilters.exclude[MissingClassProblem]("munit.internal.difflib.Diffs"),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.Diffs$"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.Equalizer"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.Equalizer$"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.InsertDelta"
),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.MyersDiff"
),
ProblemFilters.exclude[MissingClassProblem]("munit.internal.difflib.Patch"),
ProblemFilters.exclude[MissingClassProblem](
"munit.internal.difflib.PathNode"
),
ProblemFilters.exclude[MissingClassProblem]("munit.internal.difflib.Snake"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.MUnitRunner.descriptions"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.MUnitRunner.testNames"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.MUnitRunner.munitTests"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.ValueTransforms.munitTimeout"
),
ProblemFilters.exclude[MissingTypesProblem]("munit.FailException"),
ProblemFilters.exclude[MissingTypesProblem]("munit.FailSuiteException"),
ProblemFilters.exclude[MissingTypesProblem](
"munit.TestValues$FlakyFailure"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.internal.junitinterface.JUnitComputer.this"
),
// Known breaking changes for MUnit v1
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.Assertions.assertNotEquals"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.Assertions.assertEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.Assertions.assertNotEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.Assertions.assertEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.FunSuite.assertNotEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.FunSuite.assertEquals"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.FunSuite.munitTestTransform"
),
ProblemFilters.exclude[MissingClassProblem]("munit.GenericAfterEach"),
ProblemFilters.exclude[MissingClassProblem]("munit.GenericBeforeEach"),
ProblemFilters.exclude[MissingClassProblem]("munit.GenericTest"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.MUnitRunner.createTestDescription"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.Suite.beforeEach"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.Suite.afterEach"
),
ProblemFilters.exclude[MissingClassProblem]("munit.Suite$Fixture"),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.TestTransforms#TestTransform.apply"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.FunFixtures#FunFixture.this"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.SuiteTransforms#SuiteTransform.this"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.TestTransforms#TestTransform.this"
),
ProblemFilters.exclude[IncompatibleMethTypeProblem](
"munit.ValueTransforms#ValueTransform.this"
),
ProblemFilters.exclude[DirectMissingMethodProblem](
"munit.ScalaCheckSuite.unitToProp"
)
)
}

0 comments on commit 25ce89f

Please sign in to comment.