From 01a904c92e78fc95daf8034b087f311a6a860c13 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Sat, 30 Aug 2025 19:05:56 +0900 Subject: [PATCH] update mima and CI settings --- .github/workflows/ci.yml | 5 ++- build.sbt | 82 +++------------------------------------- 2 files changed, 8 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31b5417a..0615acd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,13 +57,14 @@ jobs: if: ${{ matrix.jobtype == 1 }} shell: bash run: | - sbt -v -Dfile.encoding=UTF8 -Dsbt.test.fork=true ++$SCALA212 mimaReportBinaryIssues scalafmtCheckAll headerCheck Test/headerCheck test doc + sbt -v -Dfile.encoding=UTF8 "+ mimaReportBinaryIssues" "+ scalafmtCheckAll" "+ headerCheckAll" + sbt -v -Dfile.encoding=UTF8 -Dsbt.test.fork=true ++$SCALA212 test doc sbt -v -Dfile.encoding=UTF8 -Dsbt.test.fork=false ++$SCALA213 test ++$SCALA3 test - name: Build and test (2) if: ${{ matrix.jobtype == 2 }} shell: bash run: | - sbt -v -Dfile.encoding=UTF8 -Dsbt.test.fork=true ++$SCALA212 mimaReportBinaryIssues test + sbt -v -Dfile.encoding=UTF8 -Dsbt.test.fork=true ++$SCALA212 test sbt -v --client ++$SCALA213 sbt -v --client test sbt -v --client ++$SCALA3 diff --git a/build.sbt b/build.sbt index ad77b2dd..ccc4c1f4 100644 --- a/build.sbt +++ b/build.sbt @@ -88,83 +88,11 @@ val io = (project in file("io")) Test / testForkedParallel := true, Compile / generateContrabands / sourceManaged := baseDirectory.value / "src" / "main" / "contraband-scala", console / initialCommands += "\nimport sbt.io._, syntax._", - mimaPreviousArtifacts := (CrossVersion partialVersion scalaVersion.value match { - case Some((2, n)) if n >= 13 => Set.empty - case _ => - Set( - "1.0.0", - "1.0.1", - "1.0.2", - "1.1.0", - "1.1.1", - "1.1.2", - "1.1.3", - "1.1.4", - "1.2.0", - "1.3.0", - "1.4.0", - "1.5.0", - "1.6.0", - "1.7.0", - "1.8.0", - "1.9.0", - "1.10.0", - ) map (version => organization.value %% moduleName.value % version) - }), - mimaBinaryIssueFilters ++= Seq( - exclude[FinalClassProblem]("sbt.internal.io.MacJNA$TimeBuf"), - // MiMa doesn't treat effectively final members as final - // WORKAROUND typesafehub/migration-manager#162 - exclude[FinalMethodProblem]("sbt.io.SimpleFilter.accept"), - exclude[FinalMethodProblem]("sbt.io.SimpleFileFilter.accept"), - // MiMa doesn't understand private inner classes? - // method this(sbt.io.PollingWatchService,sbt.io.PollingWatchService#PollingThread,java.nio.file.Watchable,java.util.List)Unit in class sbt.io.PollingWatchService#PollingWatchKey does not have a correspondent in current version - exclude[DirectMissingMethodProblem]("sbt.io.PollingWatchService#PollingWatchKey.this"), - exclude[IncompatibleMethTypeProblem]("sbt.io.PollingWatchService#PollingWatchKey.this"), - // This is a private class - exclude[DirectMissingMethodProblem]("sbt.io.PollingWatchService#PollingWatchKey.events"), - exclude[DirectMissingMethodProblem]("sbt.io.PollingWatchService#PollingWatchKey.offer"), - // This is a private class - exclude[DirectMissingMethodProblem]("sbt.io.PollingWatchService#PollingThread.events"), - exclude[DirectMissingMethodProblem]("sbt.io.PollingWatchService#PollingThread.initDone"), - exclude[DirectMissingMethodProblem]("sbt.io.PollingWatchService#PollingThread.initDone_="), - exclude[DirectMissingMethodProblem]( - "sbt.io.PollingWatchService#PollingThread.keysWithEvents" - ), - exclude[DirectMissingMethodProblem]("sbt.io.PollingWatchService#PollingThread.getFileTimes"), - // moved JavaMilli to sbt.io - exclude[MissingClassProblem]("sbt.internal.io.JavaMilli$"), - exclude[MissingClassProblem]("sbt.internal.io.JavaMilli"), - // These are private classes - exclude[MissingClassProblem]("sbt.internal.io.*"), - // Replaced non-standard __xstat64() with conformant stat() calls - exclude[DirectMissingMethodProblem]("sbt.internal.io.Linux32.*"), - exclude[ReversedMissingMethodProblem]("sbt.internal.io.Linux32.*"), - exclude[DirectMissingMethodProblem]("sbt.internal.io.Linux64.*"), - exclude[ReversedMissingMethodProblem]("sbt.internal.io.Linux64.*"), - // protected[this] - exclude[DirectMissingMethodProblem]("sbt.io.CopyOptions.copy*"), - // private class - exclude[MissingClassProblem]("sbt.io.Event"), - exclude[MissingClassProblem]("sbt.io.Event$"), - exclude[MissingClassProblem]("sbt.io.MacOSXWatchKey"), - exclude[MissingClassProblem]("sbt.io.PollingWatchEvent"), - exclude[MissingClassProblem]("sbt.io.PollingWatchService$PollingWatchKey"), - exclude[MissingClassProblem]("sbt.io.PollingWatchService$PollingThread"), - exclude[MissingClassProblem]("sbt.io.PollingWatchService$Overflow$"), - // private internal classes whose functionality has been replaced - exclude[MissingClassProblem]("sbt.internal.io.EventMonitor*"), - exclude[DirectMissingMethodProblem]("sbt.internal.io.EventMonitor.legacy"), - exclude[DirectMissingMethodProblem]("sbt.internal.io.EventMonitor.applyImpl"), - // private classes that have been removed - exclude[MissingClassProblem]("sbt.internal.io.Alternatives$"), - exclude[MissingClassProblem]("sbt.internal.io.Alternatives"), - exclude[DirectMissingMethodProblem]("sbt.io.NothingFilter.unary_-"), - exclude[DirectMissingMethodProblem]("sbt.io.AllPassFilter.unary_-"), - exclude[IncompatibleSignatureProblem]("sbt.io.PollingWatchService.pollEvents"), - exclude[IncompatibleSignatureProblem]("sbt.io.WatchService#WatchServiceAdapter.pollEvents"), - exclude[IncompatibleSignatureProblem]("sbt.io.WatchService.pollEvents"), - ), + mimaPreviousArtifacts := { + Set( + "1.10.5", + ).map(version => organization.value %% moduleName.value % version) + }, BuildInfoPlugin.buildInfoDefaultSettings, // avoids BuildInfo generated in Compile scope addBuildInfoToConfig(Test), Test / buildInfoKeys := Seq[BuildInfoKey](target),