If We already migrated to the new scheme, I guess We should upgrade to RC7 with -source 3.7
?
That’s one of the solutions, but I’d recommend starting with -source:3.5
(or no -source flag) if it’s still applicable. Depending on when migration happened, some of the false-positive warnings might be no longer triggering (under -source:3.6). Start with Scala version upgrade and run the tests first. Only if needed you might use -source version for some future language, but be careful it might trigger some other incompatibilities, that would have not be activated in the 3.5
In terms of lichess there is already a prepared fixed for the reactivemongo-bson that would some of the issues for all of its users.
This is probably what I should’ve done. But I didn’t know that We gonna delay this till 3.7. We already did refactor and done some work around reactivemongo issue. Now I guess revert those changes are as risky as using -source:3.7
flag.
I saw that earlier, thanks for your work, really appreciated!
3.5.0 final build is on Maven Central. As usual, we will wait a few days before announcing to check if everything in the ecosystem works correctly.
Also, there will be a blog post about plans for implicit prioritization before the 3.5 announcement, as 3.5 will be the first version to allow you to test proposed changes. You can get warnings about places in your code where the new prioritization scheme can change the compilation output or switch to the new priority altogether. Both of these modes will be opt-in.
With 3.5 I’m planning to uninstall scala-cli
altogether. I was wondering though, how will the Bash / Zsh completions work in this case? I suppose scala install-completions
will be there as an option?
They should work the same as for Scala CLI, but might need updating with install-completions or just going into the file where they are defined and excachaning the name “scala-cli” with “scala”
Scala 3.5 with batteries included is so cool!
I’m planning to use 3.5 for 200+ students that are arriving now to the new semester here at Lund University, and I’m just about to go live with install info on course pages, compendiums etc.
Do you know which day the home page https://www.scala-lang.org/ will point to 3.5 ?
We’re in the process of the 3.5.0 release, it should be finished this week including the updates to the website (hopefully sooner)
That’s great - really looking forward to 3.5 and many many thanks to everyone involved in this epic release!
(My sysadmins are nagging me for install instructions to roll it out on campus computer rooms, but I’ll try to hold 'em from opting for 3.4.2 for the semester… )
Would be nice to hear from the front lines how well 3.5 and scala-cli -> scala
works out for learning. Please let us know (if not here, then at least on Teachers), I’d like to know.
Will do! Last year we benefited immensely from scala-cli in combo with Metals in VS Code. This year I hope that the get-going process is improved and a better UX for first-time terminal users. I’ll report here when I know more (or please remind me if I forget…)
Crossposting this here: Bug when installing latest Scala with Coursier - Question - Scala Users
My hopthesis is that when you use the current install instruction here at Install | The Scala Programming Language then coursier picks up the 3.5.0 from Maven that is already there and then for some reason cannot launch it properly and the runner does not work:
$ cs launch scala:3.5.0
[warning] MainGenericRunner class is deprecated since Scala 3.5.0, and Scala CLI features will not work.
[warning] Please be sure to update to the Scala CLI launcher to use the new features.
[warning] Check the Scala 3.5.0 release notes to troubleshoot your installation.
Welcome to Scala 3.5.0 (21.0.4, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
but scala-cli still works…
$ scala-cli repl -S 3.5.0
Welcome to Scala 3.5.0 (21.0.4, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala>
Is there something fundamentally broken with the cs launcher or is this just a bootstrapping issue that will be solved once the full release process is complete?
Note that cs already currently installs 3.5.0 by default even before the announcement, and running just scala
then gives the same problem as reported on users.
@bjornregnell Bug when installing latest Scala with Coursier - #6 by Gedochao - Question - Scala Users
To sum up, this is expected, the users have to update Coursier to 2.1.10 or newer.
Aha. But doing cs update
does not 't seem to help. How to get cs 2.1.10 if you have installed the one currently pointed to on scala-lang?
I still get this after (just now after the 3.5.0 release is just being announced)
cs uninstall --all
and then
$ curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 19.9M 100 19.9M 0 0 10.8M 0 0:00:01 0:00:01 --:--:-- 31.4M
Checking if a JVM is installed
Found a JVM installed under /home/bjornr/.sdkman/candidates/java/current.
Checking if ~/.local/share/coursier/bin is in PATH
Checking if the standard Scala applications are installed
Installed ammonite
Installed cs
Installed coursier
Installed scala
Installed scalac
Installed scala-cli
Installed sbt
Installed sbtn
Installed scalafmt
bjornr@bjornux:~$ cs launch scala
[warning] MainGenericRunner class is deprecated since Scala 3.5.0, and Scala CLI features will not work.
[warning] Please be sure to update to the Scala CLI launcher to use the new features.
[warning] Check the Scala 3.5.0 release notes to troubleshoot your installation.
Welcome to Scala 3.5.0 (21.0.4, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala>
If i update as in:
$ cs update
https://repo1.maven.org/maven2/com/lihaoyi/ammonite_3.4.2/maven-metadata.xml
No new update since 2024-07-18 00:10:48
https://repo1.maven.org/maven2/com/google/code/gson/gson/maven-metadata.xml
No new update since 2024-05-19 21:00:04
https://repo1.maven.org/maven2/io/get-coursier/coursier-cli_2.13/maven-metadata.xml
No new update since 2024-05-06 15:20:32
https://repo1.maven.org/maven2/io/get-coursier/coursier-cli_2.13/maven-metadata.xml
No new update since 2024-05-06 15:20:32
https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/maven-metadata.xml
100.0% [##########] 56.5 KiB (2.1 MiB / s)
https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/maven-metadata.xml
No new update since 2024-08-22 06:38:57
https://repo1.maven.org/maven2/org/scalameta/scalafmt-cli_2.13/maven-metadata.xml
No new update since 2024-07-25 13:17:59
I still get:
$ cs launch scala
[warning] MainGenericRunner class is deprecated since Scala 3.5.0, and Scala CLI features will not work.
[warning] Please be sure to update to the Scala CLI launcher to use the new features.
[warning] Check the Scala 3.5.0 release notes to troubleshoot your installation.
Welcome to Scala 3.5.0 (21.0.4, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala>
and that is with this cs version that i get from the curl and then update as above:
$ cs version
2.1.10
How to get cs 2.1.10 if you have installed the one currently pointed to on scala-lang?
@bjornregnell I think this will depend on the platform you installed it on.
if you followed the instructions from here as they are right now, then:
- on MacOS you’d have installed it with brew, so
brew upgrade
should take care of it - on Linux you’d have used the Coursier installation script, so I actually believe
cs update coursier
should work there, as per install · Coursier - I am not familliar with running Coursier on Windows, but I’m suspecting reinstalling it manually may be the only way.
(Sorry for double-posting both here and at Users, but I thought that the more intricate details in hunting this down better fitted here and then we can report back to Users.)
I tried your proposal on Ubuntu 22.04 both cs update and wiping it and reinstalling and it still does not work… see log above.
And I get:
$ cs update coursier
https://repo1.maven.org/maven2/io/get-coursier/coursier-cli_2.13/maven-metadata.xml
No new update since 2024-05-06 15:20:32
but thats expected since I have 2.1.10 (see above)
cs launch scala
@bjornregnell This is because you are using cs launch
, rather than the actual runner bundled in the release. Ahh, this is quite a pickle, since this is the way Coursier works, rather than the Scala installation’s fault. Let me explain.
The old scala
runner has been a JAR bundled in the Scala releases. That JAR is still there. By doing cs launch scala
that is what you are running (and getting the deprecation message). It is also what is being installed as scala
by older (pre-2.1.10) Coursier versions.
So cs launch scala
will and is expected to run the old runner and yeild you the deprecation message.
To run the scala
runner you should not use cs launch scala
, since cs launch
is for running JARs from Maven dependencies, as per launch · Coursier.
The new runner (Scala CLI) is a native package (specific to your platform) ran by a script wrapper (also specific to the platform). So you have to run the scala
command available on your PATH
after running the installation:
cs install scala:3.5.0
scala version