Skip to content

v1.16.0

Latest

Choose a tag to compare

@Gedochao Gedochao released this 03 Aug 12:44
d8e650b

Script wrappers backtick $ identifiers

Scala 3.9+ warns that identifiers containing $ are reserved for internal compiler use. Script wrappers historically
used names such as hello$_, args$ and args$set. Scala CLI now wraps those names in backticks across all script
wrappers, so .sc scripts keep working cleanly on Scala 3.9 and newer.

scala-cli -e 'println("No more $ warnings in 3.9!")' -S 3.9.0-RC4

Added by @Gedochao in #4378

Sloth support (experimental ⚡️)

Scala CLI can now use Sloth to patch Scala 3.0–3.7.x lazy val bytecode for
compatibility with recent JDKs. Libraries built with older Scala 3 releases still rely on the terminally deprecated
sun.misc.Unsafe lazy val implementation, which produces warnings on JDK 24+ and may fail on future JDKs — even when
your own sources already target Scala 3.8+.

Enable Sloth with --sloth / //> using sloth to post-process classpath bytecode, or --sloth-agent /
//> using slothAgent to attach Sloth as a Java agent (for example when running tests).

object HelloSloth:
  lazy val greeting: String = "Hello from Sloth!"
  def main(args: Array[String]): Unit = println(greeting)
scala-cli --power HelloSloth.scala --sloth -S 3.3 --jvm 25

Added by @Gedochao in #4348

Features

Fixes

  • Wrap all names containing $ reserved character in backticks for all script wrappers by @Gedochao in #4378
  • Only prepend snapshot repos for *-SNAPSHOT Bloop versions by @Gedochao in #4393
  • Exclude *.asc signature files from checksums by @Gedochao in #4403

Documentation changes

Build and internal changes

  • Migrate integration tests off the stale com.spotify:docker-client to com.github.docker-java:docker-java* by @Gedochao in #4364
  • Add anti-regression tests for #4339 by @Gedochao in #4376
  • Make sure launcher download job steps are named appropriately on the CI by @Gedochao in #4382
  • Add a [test_skip] override for the CI by @Gedochao in #4385

Updates

New Contributors

Full Changelog: v1.15.0...v1.16.0