Skip to content

Commit da71914

Browse files
committed
Update for Scala 3.0.0-M2
Add Scala.js source maps for Scala 3.
1 parent 57669d8 commit da71914

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ admin/.coursier
1717
admin/.scalafmt*
1818

1919
# metals
20-
/.bloop/
20+
.bloop/
2121
/.metals/
2222
/project/**/metals.sbt
2323

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ scala:
88
- 2.11.12
99
- 2.12.12
1010
- 2.13.3
11-
- 3.0.0-M1
11+
- 3.0.0-M2
1212

1313
env:
1414
- SCALAJS_VERSION= ADOPTOPENJDK=8

build.sbt

+8-10
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ lazy val junit = libraryDependencies += "com.novocode" % "junit-interface" % "0.
5353
lazy val scala211 = "2.11.12"
5454
lazy val scala212 = "2.12.12"
5555
lazy val scala213 = "2.13.3"
56-
lazy val scala30 = "3.0.0-M1"
56+
lazy val scala30 = "3.0.0-M2"
5757

5858
lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform)(
5959
"compat",
@@ -83,15 +83,13 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform
8383
)
8484
.jsSettings(
8585
scalacOptions ++= {
86-
if (isDotty.value) Seq() // Scala.js does not support -P with Scala 3: lampepfl/dotty#9783
87-
else {
88-
val x = (LocalRootProject / baseDirectory).value.toURI.toString
89-
val y = "https://raw.githubusercontent.com/scala/scala-collection-compat/" + sys.process
90-
.Process("git rev-parse HEAD")
91-
.lineStream_!
92-
.head
93-
Seq(s"-P:scalajs:mapSourceURI:$x->$y/")
94-
}
86+
val x = (LocalRootProject / baseDirectory).value.toURI.toString
87+
val y = "https://raw.githubusercontent.com/scala/scala-collection-compat/" + sys.process
88+
.Process("git rev-parse HEAD")
89+
.lineStream_!
90+
.head
91+
val opt = if (isDotty.value) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI"
92+
Seq(s"$opt:$x->$y/")
9593
},
9694
Test / fork := false // Scala.js cannot run forked tests
9795
)

0 commit comments

Comments
 (0)