@@ -117,6 +117,8 @@ object Build {
117117 lazy val ideTestsCompilerArguments = taskKey[Seq [String ]](" Compiler arguments to use in IDE tests" )
118118 lazy val ideTestsDependencyClasspath = taskKey[Seq [File ]](" Dependency classpath to use in IDE tests" )
119119
120+ lazy val SourceDeps = config(" sourcedeps" )
121+
120122 // Settings shared by the build (scoped in ThisBuild). Used in build.sbt
121123 lazy val thisBuildSettings = Def .settings(
122124 organization := dottyOrganization,
@@ -657,19 +659,12 @@ object Build {
657659 dotc := runCompilerMain().evaluated,
658660 repl := runCompilerMain(repl = true ).evaluated,
659661
660- // FIXME: Adding the sources of scala-js ir doesn't work anymore because scalajs-ir has a few
661- // compilation errors when compiled by Dotty:
662- // - inline is now a keyword
663- // - methods defined with () need to be called with ()
664- // Until they're fixed, we rely on scalajs-ir compiled by Scala 2:
665- libraryDependencies += (" org.scala-js" %% " scalajs-ir" % scalaJSVersion).withDottyCompat(scalaVersion.value),
666- /*
667662 /* Add the sources of scalajs-ir.
668663 * To guarantee that dotty can bootstrap without depending on a version
669664 * of scalajs-ir built with a different Scala compiler, we add its
670665 * sources instead of depending on the binaries.
671666 */
672- ivyConfigurations += config("sourcedeps") .hide,
667+ ivyConfigurations += SourceDeps .hide,
673668 transitiveClassifiers := Seq (" sources" ),
674669 libraryDependencies +=
675670 (" org.scala-js" %% " scalajs-ir" % scalaJSVersion % " sourcedeps" ).withDottyCompat(scalaVersion.value),
@@ -680,7 +675,7 @@ object Build {
680675
681676 val report = updateClassifiers.value
682677 val scalaJSIRSourcesJar = report.select(
683- configuration = Set ("sourcedeps"),
678+ configuration = configurationFilter (" sourcedeps" ),
684679 module = (_ : ModuleID ).name.startsWith(" scalajs-ir_" ),
685680 artifact = artifactFilter(`type` = " src" )).headOption.getOrElse {
686681 sys.error(s " Could not fetch scalajs-ir sources " )
@@ -696,7 +691,6 @@ object Build {
696691 (trgDir ** " *.scala" ).get.toSet
697692 } (Set (scalaJSIRSourcesJar)).toSeq
698693 }.taskValue,
699- */
700694 )
701695
702696 def runCompilerMain (repl : Boolean = false ) = Def .inputTaskDyn {
0 commit comments