Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform)
ExclusionRule("com.lihaoyi", "os-lib_2.13")
)
),
buildInfoKeys += scalaBinaryVersion,
buildInfoKeys += BuildInfoKey.map(Compile / dependencyClasspath) {
case (_, v) =>
"classPath" -> v.seq
Expand All @@ -85,7 +86,7 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform)
path.replace("/jre", "")
} else path
},
buildInfoKeys += "scala3" -> (scalaVersion.value.head == '3')
buildInfoKeys += "scala3" -> (scalaBinaryVersion.value == "3")
)
.jvmSettings(
Test / test := (Test / test)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ object ScalaCliProcess {
)
.evalTap { path =>
val header = List(
s"//> using scala ${BuildInfo.scalaVersion}",
s"//> using scala ${BuildInfo.scalaBinaryVersion}",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice, a user is not going to specify the full Scala version. Most likely they will specify nothing (equivalent to 3) or 2 (equivalent to 2.13) or 2.13. So actually we should check that our toolkit works with whatever default Scalas that scala-cli is shipping.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually specify the version, but I got your point.

s"//> using toolkit typelevel:${BuildInfo.version}",
s"//> using platform ${BuildInfo.platform}"
).mkString("", "\n", "\n")
Expand Down