From 390e2f769bb5185a0e0455c47bcb614ca00688e5 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Sun, 16 Nov 2025 13:53:01 +0100 Subject: [PATCH] Add missing mapSourceURI for `scala-library-sjs` project --- project/Build.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/project/Build.scala b/project/Build.scala index 1b3d11f24990..37378641c626 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -163,6 +163,7 @@ object Build { val homepageUrl = "https://scala-lang.org/" val dottyOrganization = "org.scala-lang" val dottyGithubUrl = "https://github.com/scala/scala3" + val dottyGithubRawUserContentUrl = "https://raw.githubusercontent.com/scala/scala3" // Run tests with filter through vulpix test suite val testCompilation = inputKey[Unit]("runs integration test with the supplied filter") @@ -1457,6 +1458,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 := false,