@@ -117,6 +117,8 @@ object Build {
117
117
lazy val ideTestsCompilerArguments = taskKey[Seq [String ]](" Compiler arguments to use in IDE tests" )
118
118
lazy val ideTestsDependencyClasspath = taskKey[Seq [File ]](" Dependency classpath to use in IDE tests" )
119
119
120
+ lazy val SourceDeps = config(" sourcedeps" )
121
+
120
122
// Settings shared by the build (scoped in ThisBuild). Used in build.sbt
121
123
lazy val thisBuildSettings = Def .settings(
122
124
organization := dottyOrganization,
@@ -657,19 +659,12 @@ object Build {
657
659
dotc := runCompilerMain().evaluated,
658
660
repl := runCompilerMain(repl = true ).evaluated,
659
661
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
- /*
667
662
/* Add the sources of scalajs-ir.
668
663
* To guarantee that dotty can bootstrap without depending on a version
669
664
* of scalajs-ir built with a different Scala compiler, we add its
670
665
* sources instead of depending on the binaries.
671
666
*/
672
- ivyConfigurations += config("sourcedeps") .hide,
667
+ ivyConfigurations += SourceDeps .hide,
673
668
transitiveClassifiers := Seq (" sources" ),
674
669
libraryDependencies +=
675
670
(" org.scala-js" %% " scalajs-ir" % scalaJSVersion % " sourcedeps" ).withDottyCompat(scalaVersion.value),
@@ -680,7 +675,7 @@ object Build {
680
675
681
676
val report = updateClassifiers.value
682
677
val scalaJSIRSourcesJar = report.select(
683
- configuration = Set ("sourcedeps"),
678
+ configuration = configurationFilter (" sourcedeps" ),
684
679
module = (_ : ModuleID ).name.startsWith(" scalajs-ir_" ),
685
680
artifact = artifactFilter(`type` = " src" )).headOption.getOrElse {
686
681
sys.error(s " Could not fetch scalajs-ir sources " )
@@ -696,7 +691,6 @@ object Build {
696
691
(trgDir ** " *.scala" ).get.toSet
697
692
} (Set (scalaJSIRSourcesJar)).toSeq
698
693
}.taskValue,
699
- */
700
694
)
701
695
702
696
def runCompilerMain (repl : Boolean = false ) = Def .inputTaskDyn {
0 commit comments