@@ -21,6 +21,8 @@ import org.scalajs.sbtplugin.ScalaJSPlugin
21
21
import org .scalajs .sbtplugin .ScalaJSPlugin .autoImport ._
22
22
import sbtbuildinfo .BuildInfoPlugin
23
23
import sbtbuildinfo .BuildInfoPlugin .autoImport ._
24
+ import sbttastymima .TastyMiMaPlugin
25
+ import sbttastymima .TastyMiMaPlugin .autoImport ._
24
26
25
27
import scala .util .Properties .isJavaAtLeast
26
28
import org .portablescala .sbtplatformdeps .PlatformDepsPlugin .autoImport ._
@@ -994,6 +996,28 @@ object Build {
994
996
" scala.annotation.specialized" ,
995
997
" scala.annotation.unspecialized" ,
996
998
),
999
+ tastyMiMaPreviousArtifacts += " org.scala-lang" % " scala-library" % stdlibVersion(Bootstrapped ),
1000
+ tastyMiMaCurrentClasspath := {
1001
+ val javaBootCp = tastyMiMaJavaBootClasspath.value
1002
+ val classDir = (Compile / classDirectory).value.toPath()
1003
+ val cp0 = Attributed .data((Compile / fullClasspath).value).map(_.toPath())
1004
+ val cp : Seq [Path ] = classDir +: (javaBootCp ++ cp0)
1005
+ (cp, classDir)
1006
+ },
1007
+ tastyMiMaConfig ~= { _.withMoreProblemFilters(TastyMiMaFilters .StdlibBootstrapped ) },
1008
+ tastyMiMaReportIssues := {
1009
+ val minorVersion = previousDottyVersion.split('.' )(1 )
1010
+ // TODO find a way around this and test in the CI
1011
+ streams.value.log.warn(
1012
+ s """ To allow TASTy-MiMa to read TASTy files generated by this vesion of the compile you must:
1013
+ | * Modify the TASTy version to the latest stable release (latest version supported by TASTy-MiMa) in in tasty/src/dotty/tools/tasty/TastyFormat.scala
1014
+ | - final val MinorVersion = $minorVersion
1015
+ | - final val ExperimentalVersion = 0
1016
+ | * Clean everiting to generate a compiler with those new TASTy vesrions
1017
+ | * Run stdlib-bootstrapped/tastyMiMaReportIssues
1018
+ | """ .stripMargin)
1019
+ tastyMiMaReportIssues.value
1020
+ },
997
1021
// TODO package only TASTy files.
998
1022
// We first need to check that a project can depend on a JAR that only contains TASTy files.
999
1023
// Compile / exportJars := true,
0 commit comments