Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -scalajs-mapSourceURI in Scala 3 builds #3825

Merged
merged 1 commit into from
Mar 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,15 @@ lazy val tagName = Def.setting {

lazy val commonJsSettings = Seq(
publishConfiguration := publishConfiguration.value.withOverwrite(true), // needed since we double-publish on release
scalacOptions ++= {
if (isDotty.value) Seq()
else {
val tv = tagName.value
val tagOrHash =
if (isSnapshot.value) sys.process.Process("git rev-parse HEAD").lineStream_!.head
else tv
val a = (baseDirectory in LocalRootProject).value.toURI.toString
val g = "https://raw.githubusercontent.com/typelevel/cats/" + tagOrHash
Seq(s"-P:scalajs:mapSourceURI:$a->$g/")
}
scalacOptions += {
val tv = tagName.value
val tagOrHash =
if (isSnapshot.value) sys.process.Process("git rev-parse HEAD").lineStream_!.head
else tv
val a = (baseDirectory in LocalRootProject).value.toURI.toString
val g = "https://raw.githubusercontent.com/typelevel/cats/" + tagOrHash
val opt = if (isDotty.value) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI"
s"$opt:$a->$g/"
},
scalaJSStage in Global := FullOptStage,
scalaJSStage in Test := FastOptStage,
Expand Down