Skip to content

Commit 78ea187

Browse files
committed
Upgrade to Scala.js 1.0.0-M6 and source-depend on scalajs-ir.
1 parent bfde1ab commit 78ea187

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

project/Build.scala

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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 {

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Scala IDE project file generator
66
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
77

8-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M5")
8+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M6")
99

1010
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.1")
1111

0 commit comments

Comments
 (0)