Skip to content

Commit

Permalink
re-enable MiMa against latest stable version for published modules
Browse files Browse the repository at this point in the history
* scalafix-cli
* scalafix-core
* scalafix-interfaces
* scalafix-reflect
* scalafix-rules
* scalafix-testkit
  • Loading branch information
github-brice-jaglin committed Jun 24, 2020
1 parent 4da3d7f commit 224bb83
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 82 deletions.
2 changes: 0 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def inferJavaHome() = {
lazy val interfaces = project
.in(file("scalafix-interfaces"))
.settings(
noMima,
resourceGenerators.in(Compile) += Def.task {
val props = new java.util.Properties()
props.put("scalafixVersion", version.value)
Expand Down Expand Up @@ -156,7 +155,6 @@ lazy val testsOutput = project
lazy val testkit = project
.in(file("scalafix-testkit"))
.settings(
noMima,
moduleName := "scalafix-testkit",
isFullCrossVersion,
libraryDependencies ++= Seq(
Expand Down
63 changes: 1 addition & 62 deletions project/Mima.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,8 @@ import com.typesafe.tools.mima.core._
object Mima {
val ignoredABIProblems: Seq[ProblemFilter] = {
// To learn more about mima, see:
// See https://github.com/typesafehub/migration-manager/wiki/sbt-plugin#basic-usage
// See https://github.com/lightbend/mima
Seq(
// removed semanticdb-sbt
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.Versions.semanticdbSbt"),
// @deprecated
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.package.Mirror"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.package.Rewrite"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.package.ScalafixConfig"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.package.RewriteCtx"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.syntax.package#XtensionSymbolSemanticdbIndex.denotOpt"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.syntax.package#XtensionRefSymbolOpt.symbolOpt"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.SemanticRule.sctx"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.SemanticRule.semanticCtx"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.SemanticRule.mirror"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.RuleName.withOldName"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.RuleName.generate"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.RuleCtx.matching"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.Rule.andThen"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.rewrite.SemanticRewrite"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.rewrite.package$"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.rewrite.Rewrite"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.rewrite.package"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.lint.LintCategory.key"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.lint.LintMessage.format"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.patch.PatchOps.rename"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.package.Mirror"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.package.Rewrite"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.package.ScalafixConfig"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.package.RewriteCtx"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.syntax.package#XtensionSymbolSemanticdbIndex.denotOpt"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.syntax.package#XtensionRefSymbolOpt.symbolOpt"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.SemanticRule.sctx"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.SemanticRule.semanticCtx"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.SemanticRule.mirror"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.RuleName.withOldName"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.RuleName.generate"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.RuleCtx.matching"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.Rule.andThen"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.rewrite.SemanticRewrite"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.rewrite.package$"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.rewrite.Rewrite"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.rewrite.package"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.lint.LintCategory.key"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.lint.LintMessage.format"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.patch.PatchOps.rename"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.testkit.SemanticRuleSuite.LintAssertion"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.testkit.package$"),
ProblemFilters.exclude[MissingClassProblem]("scalafix.testkit.package"),
// marked private[scalafix]
ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.rule.RuleCtx.printLintMessage"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.rule.RuleCtx.filter"),
ProblemFilters.exclude[IncompatibleMethTypeProblem]("scalafix.patch.Patch.apply"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.patch.Patch.reportLintMessages"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.patch.Patch.lintMessages"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.rule.RuleCtx.printLintMessage"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.rule.RuleCtx.filterLintMessage"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.cli.CliRunner.this"),
ProblemFilters.exclude[FinalClassProblem]("scalafix.util.TokenList"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.util.TokenList.leadingSpaces"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.util.TokenList.trailingSpaces"),
// Other
ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.patch.PatchOps.replaceSymbols"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.patch.PatchOps.removeTokens"),
ProblemFilters.exclude[Problem]("scalafix.internal.*")
)
}
Expand Down
32 changes: 14 additions & 18 deletions project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,19 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
"unit/test" ::
"docs/run" ::
"interfaces/doc" ::
"mimaReportBinaryIssues" ::
s
},
commands += Command.command("ci-212") { s =>
s"++$scala212" ::
"unit/test" ::
"mimaReportBinaryIssues" ::
s
},
commands += Command.command("ci-211") { s =>
s"++$scala211" ::
"unit/test" ::
"mimaReportBinaryIssues" ::
s
},
commands += Command.command("ci-213-windows") { s =>
Expand All @@ -212,12 +215,6 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
s"unit/testOnly -- -l scalafix.internal.tests.utils.SkipWindows" ::
s
},
commands += Command.command("mima") { s =>
// Disabled until v0.6.0 stable
// "scalafix/mimaReportBinaryIssues" ::
// "scalafix211/mimaReportBinaryIssues" ::
s
},
// There is flakyness in CliGitDiffTests and CliSemanticTests
parallelExecution.in(Test) := false,
credentials ++= {
Expand Down Expand Up @@ -283,10 +280,8 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
)

private val PreviousScalaVersion = Map(
"2.11.12" -> "2.11.11",
"2.12.4" -> "2.12.3",
"2.12.8" -> "2.12.7",
"2.12.10" -> "2.12.8"
"2.13.3" -> "2.13.2",
"2.12.12" -> "2.12.11"
)

override def projectSettings: Seq[Def.Setting[_]] = List(
Expand All @@ -306,15 +301,16 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
)
),
mimaPreviousArtifacts := {
val previousArtifactVersion = "0.9.6"
// NOTE(olafur) shudder, can't figure out simpler way to do the same.
val binaryVersion =
if (crossVersion.value.isInstanceOf[CrossVersion.Full]) {
val version = scalaVersion.value
PreviousScalaVersion.getOrElse(version, version)
} else scalaBinaryVersion.value
val currentScalaFullV = scalaVersion.value
val previousScalaFullV =
PreviousScalaVersion.getOrElse(currentScalaFullV, currentScalaFullV)
val previousScalaVCrossName = CrossVersion(
crossVersion.value,
previousScalaFullV,
scalaBinaryVersion.value
).getOrElse(identity[String] _)(moduleName.value)
Set(
organization.value % s"${moduleName.value}_$binaryVersion" % previousArtifactVersion
organizationName.value % previousScalaVCrossName % stableVersion.value
)
},
mimaBinaryIssueFilters ++= Mima.ignoredABIProblems,
Expand Down

0 comments on commit 224bb83

Please sign in to comment.