Skip to content

Commit aa126f2

Browse files
committed
Add forward compatibility check for stdlib-bootstrapped
If we want to use the TASTy of this version of the library with the binaries generated be the Scala 2.13 compiler, we need to make sure stdlib-bootstrapped is forwards compatible. For example we can not call a methods that is available in the dotty compiled version but not in the Scala 2 compiled version.
1 parent dde0482 commit aa126f2

File tree

2 files changed

+328
-1
lines changed

2 files changed

+328
-1
lines changed

project/Build.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,8 @@ object Build {
937937
).mkString(File.pathSeparator),
938938
)
939939
},
940+
mimaCheckDirection := "both",
941+
mimaBinaryIssueFilters ++= MiMaFilters.LibraryBootstrappedForward,
940942
run := {
941943
val args: Seq[String] = spaceDelimited("<arg>").parsed
942944
val reference = (Compile/sourceManaged).value / "scala-library-src"
@@ -1085,14 +1087,14 @@ object Build {
10851087
(Test / managedClasspath) ~= {
10861088
_.filterNot(file => file.data.getName == s"scala-library-${stdlibVersion(Bootstrapped)}.jar")
10871089
},
1088-
mimaCheckDirection := "backward",
10891090
mimaPreviousArtifacts +=
10901091
("org.scala-lang" % "scala-library" % stdlibVersion(Bootstrapped)),
10911092
mimaExcludeAnnotations ++= Seq(
10921093
"scala.annotation.experimental",
10931094
"scala.annotation.specialized",
10941095
"scala.annotation.unspecialized",
10951096
),
1097+
mimaCheckDirection := "backward",
10961098
mimaBinaryIssueFilters ++= MiMaFilters.LibraryBootstrapped,
10971099
)
10981100

0 commit comments

Comments
 (0)