@@ -2088,21 +2088,22 @@ object Build {
20882088 moduleName := " scala3-compiler" ,
20892089 version := dottyNonBootstrappedVersion,
20902090 versionScheme := Some (" semver-spec" ),
2091- scalaVersion := referenceVersion , // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
2091+ scalaVersion := dottyNonBootstrappedVersion , // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
20922092 crossPaths := true , // org.scala-lang:scala3-compiler has a crosspath
20932093 // sbt shouldn't add stdlib automatically, we depend on `scala3-library-nonbootstrapped`
20942094 autoScalaLibrary := false ,
2095- // Add the source directories for the stdlib (non-boostrapped)
2095+ // Add the source directories for the compiler (non-boostrapped)
20962096 Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
20972097 Compile / unmanagedSourceDirectories += baseDirectory.value / " src-non-bootstrapped" ,
20982098 // All the dependencies needed by the compiler
20992099 libraryDependencies ++= Seq (
2100+ " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
21002101 " org.scala-lang.modules" % " scala-asm" % " 9.8.0-scala-1" ,
21012102 Dependencies .compilerInterface,
21022103 " org.jline" % " jline-reader" % " 3.29.0" ,
21032104 " org.jline" % " jline-terminal" % " 3.29.0" ,
21042105 " org.jline" % " jline-terminal-jni" % " 3.29.0" ,
2105- // ("io.get-coursier" %% "coursier" % "2.0.16" % Test).cross(CrossVersion.for3Use2_13),
2106+ (" io.get-coursier" %% " coursier" % " 2.0.16" % Test ).cross(CrossVersion .for3Use2_13),
21062107 ),
21072108 // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
21082109 Compile / scalacOptions := Seq (" -deprecation" , " -feature" , " -unchecked" , " -encoding" , " UTF8" , " -language:implicitConversions" ),
@@ -2147,21 +2148,31 @@ object Build {
21472148 }.taskValue,
21482149 // sbt adds all the projects to scala-tool config which breaks building the scalaInstance
21492150 // as a workaround, I build it manually by only adding the compiler
2151+ managedScalaInstance := false ,
21502152 scalaInstance := {
21512153 val lm = dependencyResolution.value
21522154 val log = streams.value.log
2153- val retrieveDir = streams.value.cacheDirectory / " scala3-compiler" / scalaVersion.value
2155+ val retrieveDir = streams.value.cacheDirectory / " scala3-compiler" / referenceVersion
21542156 val comp = lm.retrieve(" org.scala-lang" % " scala3-compiler_3" %
2155- scalaVersion.value , scalaModuleInfo = None , retrieveDir, log)
2157+ referenceVersion , scalaModuleInfo = None , retrieveDir, log)
21562158 .fold(w => throw w.resolveException, identity)
21572159 Defaults .makeScalaInstance(
2158- scalaVersion.value ,
2160+ referenceVersion ,
21592161 Array .empty,
21602162 comp.toSeq,
21612163 Seq .empty,
21622164 state.value,
21632165 scalaInstanceTopLoader.value,
21642166 )},
2167+ scalaCompilerBridgeBinaryJar := {
2168+ val lm = dependencyResolution.value
2169+ val log = streams.value.log
2170+ val retrieveDir = streams.value.cacheDirectory / " scala3-sbt-bridge" / referenceVersion
2171+ val comp = lm.retrieve(" org.scala-lang" % " scala3-sbt-bridge" %
2172+ referenceVersion, scalaModuleInfo = None , retrieveDir, log)
2173+ .fold(w => throw w.resolveException, identity)
2174+ Some (comp(0 ))
2175+ },
21652176 /* Add the sources of scalajs-ir.
21662177 * To guarantee that dotty can bootstrap without depending on a version
21672178 * of scalajs-ir built with a different Scala compiler, we add its
0 commit comments