@@ -2118,21 +2118,22 @@ object Build {
21182118 moduleName := " scala3-compiler" ,
21192119 version := dottyNonBootstrappedVersion,
21202120 versionScheme := Some (" semver-spec" ),
2121- scalaVersion := referenceVersion , // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
2121+ scalaVersion := dottyNonBootstrappedVersion , // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
21222122 crossPaths := true , // org.scala-lang:scala3-compiler has a crosspath
21232123 // sbt shouldn't add stdlib automatically, we depend on `scala3-library-nonbootstrapped`
21242124 autoScalaLibrary := false ,
2125- // Add the source directories for the stdlib (non-boostrapped)
2125+ // Add the source directories for the compiler (non-boostrapped)
21262126 Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
21272127 Compile / unmanagedSourceDirectories += baseDirectory.value / " src-non-bootstrapped" ,
21282128 // All the dependencies needed by the compiler
21292129 libraryDependencies ++= Seq (
2130+ " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
21302131 " org.scala-lang.modules" % " scala-asm" % " 9.8.0-scala-1" ,
21312132 Dependencies .compilerInterface,
21322133 " org.jline" % " jline-reader" % " 3.29.0" ,
21332134 " org.jline" % " jline-terminal" % " 3.29.0" ,
21342135 " org.jline" % " jline-terminal-jni" % " 3.29.0" ,
2135- // ("io.get-coursier" %% "coursier" % "2.0.16" % Test).cross(CrossVersion.for3Use2_13),
2136+ (" io.get-coursier" %% " coursier" % " 2.0.16" % Test ).cross(CrossVersion .for3Use2_13),
21362137 ),
21372138 // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
21382139 Compile / scalacOptions := Seq (" -deprecation" , " -feature" , " -unchecked" , " -encoding" , " UTF8" , " -language:implicitConversions" ),
@@ -2178,21 +2179,31 @@ object Build {
21782179 (Compile / sourceGenerators) += ShadedSourceGenerator .task.taskValue,
21792180 // sbt adds all the projects to scala-tool config which breaks building the scalaInstance
21802181 // as a workaround, I build it manually by only adding the compiler
2182+ managedScalaInstance := false ,
21812183 scalaInstance := {
21822184 val lm = dependencyResolution.value
21832185 val log = streams.value.log
2184- val retrieveDir = streams.value.cacheDirectory / " scala3-compiler" / scalaVersion.value
2186+ val retrieveDir = streams.value.cacheDirectory / " scala3-compiler" / referenceVersion
21852187 val comp = lm.retrieve(" org.scala-lang" % " scala3-compiler_3" %
2186- scalaVersion.value , scalaModuleInfo = None , retrieveDir, log)
2188+ referenceVersion , scalaModuleInfo = None , retrieveDir, log)
21872189 .fold(w => throw w.resolveException, identity)
21882190 Defaults .makeScalaInstance(
2189- scalaVersion.value ,
2191+ referenceVersion ,
21902192 Array .empty,
21912193 comp.toSeq,
21922194 Seq .empty,
21932195 state.value,
21942196 scalaInstanceTopLoader.value,
21952197 )},
2198+ scalaCompilerBridgeBinaryJar := {
2199+ val lm = dependencyResolution.value
2200+ val log = streams.value.log
2201+ val retrieveDir = streams.value.cacheDirectory / " scala3-sbt-bridge" / referenceVersion
2202+ val comp = lm.retrieve(" org.scala-lang" % " scala3-sbt-bridge" %
2203+ referenceVersion, scalaModuleInfo = None , retrieveDir, log)
2204+ .fold(w => throw w.resolveException, identity)
2205+ Some (comp(0 ))
2206+ },
21962207 /* Add the sources of scalajs-ir.
21972208 * To guarantee that dotty can bootstrap without depending on a version
21982209 * of scalajs-ir built with a different Scala compiler, we add its
0 commit comments