Skip to content

Commit 702530d

Browse files
committed
Include Scala Native/Scala.js/JVM version in logged project params
1 parent 134d710 commit 702530d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

modules/options/src/main/scala/scala/build/options/BuildOptions.scala

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,19 @@ final case class BuildOptions(
5656
value(scalaParams) match {
5757
case Some(scalaParams0) =>
5858
val platform0 = platform.value match {
59-
case Platform.JVM => "JVM"
60-
case Platform.JS => "Scala.js"
61-
case Platform.Native => "Scala Native"
59+
case Platform.JVM =>
60+
val jvmIdSuffix =
61+
javaOptions.jvmIdOpt
62+
.orElse(Some(javaHome().value.version.toString))
63+
.map(" (" + _ + ")").getOrElse("")
64+
s"JVM$jvmIdSuffix"
65+
case Platform.JS =>
66+
val scalaJsVersion = scalaJsOptions.version.getOrElse(Constants.scalaJsVersion)
67+
s"Scala.js $scalaJsVersion"
68+
case Platform.Native =>
69+
val scalaNativeVersion =
70+
scalaNativeOptions.version.getOrElse(Constants.scalaNativeVersion)
71+
s"Scala Native $scalaNativeVersion"
6272
}
6373
Seq(s"Scala ${scalaParams0.scalaVersion}", platform0)
6474
case None =>

0 commit comments

Comments
 (0)