Skip to content

Commit 68550a0

Browse files
committed
[build] Add missing mapSourceURI for scala-library-sjs project (#24450)
`-scalajs-mapSourceURI` was missing, it's required to emit correct debug informaiton in Scala.js debuggers [Cherry-picked 01e92e0][modified]
1 parent 489265e commit 68550a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

project/Build.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,6 +2192,16 @@ object Build {
21922192
Compile / scalacOptions += "-Yno-stdlib-patches",
21932193
Compile / scalacOptions += "-Yexplicit-nulls",
21942194
Compile / scalacOptions += "-scalajs",
2195+
// Configure the source maps to point to GitHub for releases
2196+
Compile / scalacOptions ++= {
2197+
if (isRelease) {
2198+
val baseURI = (LocalRootProject / baseDirectory).value.toURI
2199+
val dottyVersion = version.value
2200+
Seq(s"-scalajs-mapSourceURI:$baseURI->$dottyGithubRawUserContentUrl/$dottyVersion/")
2201+
} else {
2202+
Nil
2203+
}
2204+
},
21952205
// Packaging configuration of the stdlib
21962206
Compile / packageBin / publishArtifact := true,
21972207
Compile / packageDoc / publishArtifact := true,

0 commit comments

Comments
 (0)