Skip to content

Commit e274d0c

Browse files
committed
chore: add MiMa checks for tasty-core
1 parent 101e655 commit e274d0c

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed

.github/workflows/stdlib.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,24 @@ jobs:
337337
- name: Report MiMa issues in `scala3-interfaces`
338338
run: ./project/scripts/sbt scala3-interfaces/mimaReportBinaryIssues
339339

340+
mima-tasty-core-nonbootstrapped:
341+
runs-on: ubuntu-latest
342+
needs: tasty-core-nonbootstrapped
343+
steps:
344+
- name: Git Checkout
345+
uses: actions/checkout@v5
346+
347+
- name: Set up JDK 17
348+
uses: actions/setup-java@v5
349+
with:
350+
distribution: 'temurin'
351+
java-version: 17
352+
cache: 'sbt'
353+
354+
- uses: sbt/setup-sbt@v1
355+
- name: Report MiMa issues in `tasty-core-nonbootstrapped`
356+
run: ./project/scripts/sbt tasty-core-nonbootstrapped/mimaReportBinaryIssues
357+
340358
mima-scala-library-bootstrapped:
341359
runs-on: ubuntu-latest
342360
needs: scala-library-bootstrapped
@@ -355,6 +373,24 @@ jobs:
355373
- name: Report MiMa issues in `scala-library-bootstrapped`
356374
run: ./project/scripts/sbt scala-library-bootstrapped/mimaReportBinaryIssues
357375

376+
mima-tasty-core-bootstrapped:
377+
runs-on: ubuntu-latest
378+
needs: tasty-core-bootstrapped
379+
steps:
380+
- name: Git Checkout
381+
uses: actions/checkout@v5
382+
383+
- name: Set up JDK 17
384+
uses: actions/setup-java@v5
385+
with:
386+
distribution: 'temurin'
387+
java-version: 17
388+
cache: 'sbt'
389+
390+
- uses: sbt/setup-sbt@v1
391+
- name: Report MiMa issues in `tasty-core-bootstrapped`
392+
run: ./project/scripts/sbt tasty-core-bootstrapped-new/mimaReportBinaryIssues
393+
358394
#################################################################################################
359395
########################################### TEST JOBS ###########################################
360396
#################################################################################################

project/Build.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1973,6 +1973,7 @@ object Build {
19731973
/* Configuration of the org.scala-lang:tasty-core_3:*.**.**-nonbootstrapped project */
19741974
lazy val `tasty-core-nonbootstrapped` = project.in(file("tasty"))
19751975
.dependsOn(`scala3-library-nonbootstrapped`)
1976+
.settings(commonMiMaSettings)
19761977
.settings(
19771978
name := "tasty-core-nonbootstrapped",
19781979
moduleName := "tasty-core",
@@ -2026,13 +2027,16 @@ object Build {
20262027
Test / envVars ++= Map(
20272028
"EXPECTED_TASTY_VERSION" -> expectedTastyVersion,
20282029
),
2029-
2030+
mimaForwardIssueFilters := MiMaFilters.TastyCore.ForwardsBreakingChanges,
2031+
mimaBackwardIssueFilters := MiMaFilters.TastyCore.BackwardsBreakingChanges,
2032+
customMimaReportBinaryIssues("MiMaFilters.TastyCore"),
20302033
)
20312034

20322035
/* Configuration of the org.scala-lang:tasty-core_3:*.**.**-bootstrapped project */
20332036
lazy val `tasty-core-bootstrapped-new` = project.in(file("tasty"))
20342037
.dependsOn(`scala3-library-bootstrapped-new`)
20352038
.settings(publishSettings)
2039+
.settings(commonMiMaSettings)
20362040
.settings(
20372041
name := "tasty-core-bootstrapped",
20382042
moduleName := "tasty-core",
@@ -2095,6 +2099,9 @@ object Build {
20952099
Test / envVars ++= Map(
20962100
"EXPECTED_TASTY_VERSION" -> expectedTastyVersion,
20972101
),
2102+
mimaForwardIssueFilters := MiMaFilters.TastyCore.ForwardsBreakingChanges,
2103+
mimaBackwardIssueFilters := MiMaFilters.TastyCore.BackwardsBreakingChanges,
2104+
customMimaReportBinaryIssues("MiMaFilters.TastyCore"),
20982105
)
20992106

21002107
// ==============================================================================================

project/MiMaFilters.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,13 @@ object MiMaFilters {
617617
)
618618

619619
val BackwardsBreakingChanges: Map[String, Seq[ProblemFilter]] = Map(
620+
Build.mimaPreviousDottyVersion -> Seq(
621+
// These are legitimate issues that needs to be investigated
622+
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyVersion.copy"),
623+
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyVersion.copy$default$1"),
624+
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyVersion.copy$default$2"),
625+
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyVersion.copy$default$3"),
626+
),
620627
// Breaking changes since last LTS
621628
Build.mimaPreviousLTSDottyVersion -> Seq.empty // We should never break backwards compatibility
622629
)

0 commit comments

Comments
 (0)