diff --git a/build.sbt b/build.sbt index ba27446643..ce1d3eb2b6 100644 --- a/build.sbt +++ b/build.sbt @@ -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) @@ -156,7 +155,6 @@ lazy val testsOutput = project lazy val testkit = project .in(file("scalafix-testkit")) .settings( - noMima, moduleName := "scalafix-testkit", isFullCrossVersion, libraryDependencies ++= Seq( diff --git a/project/Mima.scala b/project/Mima.scala index d32e116585..7ee535e2b9 100644 --- a/project/Mima.scala +++ b/project/Mima.scala @@ -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.*") ) } diff --git a/project/ScalafixBuild.scala b/project/ScalafixBuild.scala index b545579087..9ad75b8fd7 100644 --- a/project/ScalafixBuild.scala +++ b/project/ScalafixBuild.scala @@ -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 => @@ -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 ++= { @@ -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( @@ -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,