You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted, for Scala it shows the $MAJOR.$MINOR.$SECURITY version scheme but for Java it only prints out the $MAJOR part.
I'd like to know the full Java version used by scala-cli when not providing it via directives like //> using jvm 21.0.2 or command option --jvm 21.0.2. i.e
Debugging purposes, in case that by manual installation or using tools such as sdkman a machine has two similar Java versions x.y1.z1 and x.y2.z2 where x is the same in both installations.
For consistency because the other platforms; Scala, Javascript and Scala-Native do report the full version since 9d47089 (Merge pull request Bump Scala Native to 0.4.16 & log platform version #2465 from Gedochao/maintenance/scala-native-improvements, 2023-10-17)
Describe the solution you'd like
When running a script, it reports the full Java version being used
Describe alternatives you've considered
If this feature request is not incorporated, and one would like to know the Java version, it would be necessary to inspect the Java version before hand via typing java --version
Gedochao
added
UX
java
Issues tied to compiling & running of Java code
jvm
Issues tied to the JVM platform
and removed
java
Issues tied to compiling & running of Java code
labels
Jun 24, 2024
Is your feature request related to a problem? Please describe.
When executing a Scala script, scala-cli reports the Scala and Java version used.
As noted, for Scala it shows the
$MAJOR.$MINOR.$SECURITY
version scheme but for Java it only prints out the$MAJOR
part.I'd like to know the full Java version used by scala-cli when not providing it via directives like
//> using jvm 21.0.2
or command option--jvm 21.0.2
. i.eI have two reasons for this feature request:
Debugging purposes, in case that by manual installation or using tools such as sdkman a machine has two similar Java versions
x.y1.z1
andx.y2.z2
wherex
is the same in both installations.For consistency because the other platforms; Scala, Javascript and Scala-Native do report the full version since
9d47089 (Merge pull request Bump Scala Native to 0.4.16 & log platform version #2465 from Gedochao/maintenance/scala-native-improvements, 2023-10-17)
Describe the solution you'd like
When running a script, it reports the full Java version being used
i.e
Describe alternatives you've considered
If this feature request is not incorporated, and one would like to know the Java version, it would be necessary to inspect the Java version before hand via typing
java --version
Additional context
After having a preliminary code revision, it seems like the change can be introduced in
scala.build.options.BuildOptions#projectParams
Additionally, as stated in https://openjdk.org/jeps/223. There is a set of system properties that can be used to extract the version.
The text was updated successfully, but these errors were encountered: