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

Update FAQ entry about scala.util.Properties.versionNumberString to cover JS and Native #2905

Open
SethTisue opened this issue Sep 20, 2023 · 3 comments
Assignees

Comments

@SethTisue
Copy link
Member

SethTisue commented Sep 20, 2023

https://docs.scala-lang.org/tutorials/FAQ/index.html#i-want-scala-3-why-does-versionnumberstring-say-im-on-213

TIL on Scala.js that it doesn't work because it tries to read a resource and Scala.js doesn't do that

so I guess the entry will have to suggest sbt-buildinfo and/or the Scala-CLI equivalent (they recently added one)

what about Native, does it work on Native?

@SethTisue SethTisue self-assigned this Sep 20, 2023
@JD557
Copy link
Contributor

JD557 commented Sep 20, 2023

With the following script:

//> using scala 3.3.1

println("version:" + scala.util.Properties.versionNumberString)

I can get it to work on both JVM and Native.

However, I get version:2.13.10 on the JVM and version:2.13.11 on native. So I wonder if something funky is going on here.

Using scala-cli v..0.4 and Scala Native v0.4.14

@SethTisue
Copy link
Member Author

However, I get version:2.13.10 on the JVM

That's expected; by 3.3.2 we should have 2.13.12; I'm pursuing it at scala/scala3#18525 (comment)

version:2.13.11 on native.

That, I don't understand

@SethTisue
Copy link
Member Author

when I'm updating this, I should consider whether it makes sense to further expand the FAQ answer, or whether this info could move to the Scaladoc. we try to avoid having the FAQ be the main documentation point for anything, preferring FAQ answers to be kept short and primarily link to information living elsewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants