Skip to content

Commit aae2d5d

Browse files
committed
Split forwards and backwards incompatibilities
This makes it evident which changes are backwards incompatible and which are froward incompatible. Previously it was not clear which changes were backwards incompatible and which were forwards incompatible.
1 parent 373b600 commit aae2d5d

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

project/Build.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,8 @@ object Build {
21632163
(Compile/doc/target).value
21642164
},
21652165
commonMiMaSettings,
2166-
mimaBinaryIssueFilters ++= MiMaFilters.Library
2166+
mimaBackwardIssueFilters := MiMaFilters.LibraryBackwards,
2167+
mimaForwardIssueFilters := MiMaFilters.LibraryForward,
21672168
)
21682169
} else base
21692170
}

project/MiMaFilters.scala

+18-10
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,24 @@
22
import com.typesafe.tools.mima.core._
33

44
object MiMaFilters {
5-
val Library: Seq[ProblemFilter] = Seq(
6-
// This language feature was in 3.4.0-RC1 but will be removed in 3.4.0-RC2
7-
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language#deprecated.ascriptionVarargsUnpacking"),
8-
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$deprecated$ascriptionVarargsUnpacking$"),
9-
10-
// This language feature is not in 3.4.0-RC1 but will be added in 3.4.0-RC2
11-
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.5-migration"),
12-
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.5"),
13-
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E5$"),
14-
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E5$minusmigration$"),
5+
val LibraryBackwards: Map[String, Seq[ProblemFilter]] = Map(
6+
// In general we should never have backwards incompatible changes in the library.
7+
// Only exceptional cases should be added here.
8+
Build.previousDottyVersion -> Seq(
9+
// This language feature was in 3.4.0-RC1 but will be removed in 3.4.0-RC2
10+
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language#deprecated.ascriptionVarargsUnpacking"),
11+
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$deprecated$ascriptionVarargsUnpacking$"),
12+
)
13+
)
14+
val LibraryForward: Map[String, Seq[ProblemFilter]] = Map(
15+
// Additions that require a new minor version of the library
16+
Build.previousDottyVersion -> Seq(
17+
// This language feature is not in 3.4.0-RC1 but will be added in 3.4.0-RC2
18+
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.5-migration"),
19+
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.5"),
20+
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E5$"),
21+
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E5$minusmigration$"),
22+
)
1523
)
1624
val TastyCore: Seq[ProblemFilter] = Seq(
1725
)

0 commit comments

Comments
 (0)