From 68550a011a2dcd3c236fc602f19b20ff7345f7a9 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Mon, 24 Nov 2025 21:12:59 +0100 Subject: [PATCH] [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 01e92e03dcf961ce408bf1e84e3057a9d3527298][modified] --- project/Build.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/project/Build.scala b/project/Build.scala index b820e904bf69..b36c62c00703 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -2192,6 +2192,16 @@ object Build { Compile / scalacOptions += "-Yno-stdlib-patches", Compile / scalacOptions += "-Yexplicit-nulls", Compile / scalacOptions += "-scalajs", + // Configure the source maps to point to GitHub for releases + Compile / scalacOptions ++= { + if (isRelease) { + val baseURI = (LocalRootProject / baseDirectory).value.toURI + val dottyVersion = version.value + Seq(s"-scalajs-mapSourceURI:$baseURI->$dottyGithubRawUserContentUrl/$dottyVersion/") + } else { + Nil + } + }, // Packaging configuration of the stdlib Compile / packageBin / publishArtifact := true, Compile / packageDoc / publishArtifact := true,