Skip to content

v1.0.6

Compare
Choose a tag to compare
@Gedochao Gedochao released this 09 Nov 13:50
· 360 commits to main since this release
7be704c

Scala CLI won't default to the system JVM if it's not supported anymore

If your JAVA_HOME environment variable has been pointing to a JVM that is no longer supported by Scala CLI (so anything below 17, really), you may have run into an error like this one with Scala CLI v1.0.5:

scala-cli --power bloop exit 
# Stopped Bloop server.  
export JAVA_HOME=$(cs java-home --jvm zulu:8)
scala-cli -e 'println(System.getProperty("java.version"))'                
# Starting compilation server
# Error: bloop.rifle.FailedToStartServerExitCodeException: Server failed with exit code 1
# For more details, please see '/var/folders/5n/_ggj7kk93czdt_n0jzrk8s780000gn/T/1343202731019130640/.scala-build/stacktraces/1699527280-9858975811713766588.log'
# Running
#   scala-cli --power bloop output
# might give more details.

This is because we no longer support JVM <17 with Scala CLI v1.0.5, but we still have been defaulting to whatever JVM was defined in JAVA_HOME. As a result, Bloop has been failing to start when running with, say, JAVA_HOME pointing to Java 8.

This is no longer the case. Scala CLI will now automatically download Java 17 for Bloop in such a situation (and still use the JVM from JAVA_HOME for running the code, while Bloop runs on 17).

scala-cli --power bloop exit 
# Stopped Bloop server.  
export JAVA_HOME=$(cs java-home --jvm zulu:8)
scala-cli -e 'println(System.getProperty("java.version"))'                
# Starting compilation server
# Compiling project (Scala 3.3.1, JVM (8))
# Compiled project (Scala 3.3.1, JVM (8))
# 1.8.0_392

Added by @tgodzik in #2508.

Other changes

Fixes

  • Fix --watch failing on invalid PathWatchers.Event & skip wonky tests on Mac CI by @Gedochao in #2515
  • bugfix: Don't try to always get system jvm first by @tgodzik in #2508

Documentation changes

  • Back port of documentation changes to main by @github-actions in #2522
  • add cookbook about Emacs integration by @ag91 in #2506

Build and internal changes

Updates and maintenance

New Contributors

Full Changelog: v1.0.5...v1.0.6