Releases: VirtusLab/scala-cli
Release list
v1.15.0
Default Scala 3.8.4, Scala Native 0.5.12 & Scala.js 1.22.0
This Scala CLI version bumps the default Scala version to 3.8.4, Scala Native to 0.5.12 and Scala.js to 1.22.0.
scala-cli version
# Scala CLI version: 1.15.0
# Scala version (default): 3.8.4scala-cli -e 'println("Hello from Scala.js 1.22.0!")' --js
# Compiling project (Scala 3.8.4, Scala.js 1.22.0)
# Compiled project (Scala 3.8.4, Scala.js 1.22.0)
# Hello from Scala.js 1.22.0!scala-cli -e 'println("Hello from Scala Native 0.5.12!")' --native
# Compiling project (Scala 3.8.4, Scala Native 0.5.12)
# Compiled project (Scala 3.8.4, Scala Native 0.5.12)
# Hello from Scala Native 0.5.12!Scala 3.8.4 was added by @Gedochao in #4299
Scala Native 0.5.12 was added by @WojciechMazur in #4286
Scala.js 1.22.0 was added by @Gedochao in #4344
JShell support in repl
scala-cli repl can now use JShell as its REPL backend, enabled with the --jshell (--jsh) flag. JShell is also picked automatically for pure-Java projects. The project's classpath (including dependencies) is available inside the JShell session, so you can play with your code (and even reference Scala classes via reflection). JShell requires JDK 9 or newer.
package demo;
public class HelloJShell {
public static String greet() { return "Hello from JShell!"; }
}System.out.println(demo.HelloJShell.greet());
scala-cli repl demo/HelloJShell.java --jshell --jvm 17 --repl-quit-after-init --repl-init-script-file hi.jshNote: It is possible to explicitly disable JShell on pure Java projects and revert to using Scala REPL with --jshell=false.
java snippets in Markdown inputs (experimental ⚡️)
Scala CLI can now compile and run java code blocks inside Markdown inputs, mirroring the existing support for scala snippets. A java snippet is treated like a regular .java input (its body is emitted as Java source without any wrapping). As with other Markdown features, this requires --power.
# Java in Markdown
```java
public class HelloMarkdown {
public static void main(String[] args) {
System.out.println("Hello from a Java snippet in Markdown!");
}
}
```scala-cli --power HelloMarkdown.mdWebAssembly support (experimental ⚡️)
Scala CLI can now compile and run Scala.js through the experimental Scala.js WebAssembly backend. Enable it with the --js-emit-wasm flag (or the //> using wasm directive) together with ES module output (--js-module-kind es / //> using jsModuleKind es).
The Wasm output runs on a JavaScript host that embeds a Wasm engine. Scala CLI does not bundle any of these runtimes — you have to install Node.js (the default), Deno or Bun yourself, then select one with --js-runtime. See the Scala.js with Wasm guide for the details and runtime version requirements.
//> using wasm
//> using jsModuleKind es
@main def hello(): Unit = println("Hello from Wasm!")# Node.js is the default runtime - no runtime flag needed
scala-cli run HelloWasm.scala --power
# run the same Wasm output on Deno
scala-cli run HelloWasm.scala --power --js-runtime deno
# ...or on Bun
scala-cli run HelloWasm.scala --power --js-runtime bunAdded by @lostflydev in #4176
JUnit 5 (Jupiter) support
The test runner now supports JUnit 5 (Jupiter) via the jupiter-interface test interface, for both Scala and pure-Java tests. JUnit 5 requires Java 17 or newer.
//> using test.dep com.github.sbt.junit:jupiter-interface:0.19.0
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.Assertions.*
class MyJupiterTests {
@Test
def addition(): Unit = {
assertEquals(4, 2 + 2)
println("Hello from JUnit 5 / Jupiter!")
}
}scala-cli test MyJupiterTests.test.scala --jvm 17SBT 2.x export
The export sub-command can now generate SBT 2.x builds (the default SBT version used for the export is now 2.0.0). Pick a specific version with --sbt-version.
@main def hello(): Unit = println("Hello from an SBT 2.x export!")scala-cli --power export hello.scala --sbt --sbt-version 2.0.0 -o sbt-project
cat sbt-project/project/build.propertiesVisual Studio 2026 support on Windows
When building Scala Native (or packaging GraalVM native images) on Windows, Scala CLI locates the MSVC toolchain from your Visual Studio installation. It now also detects Visual Studio 2026, and bundles the matching Visual C++ redistributable (vcredist) in the generated MSI installers.
Dropped Ammonite support
The Ammonite REPL integration has been removed (it was deprecated back in v1.13.0). The --ammonite (--amm), --ammonite-version and --ammonite-arg options are gone from scala-cli repl; use the default Scala REPL (or the new JShell backend for Java projects) instead.
scala-cli repl --ammoniteFeatures
- Add support for JShell in
replby @Gedochao in #4262 - Add support for ```java snippets in Markdown inputs by @Gedochao in #4284
- Add Wasm support:
--wasmflag with Node.js, Deno & Bun runtimes by @lostflydev in #4176 - Add support for VS 2026 in
vcredistby @Gedochao in #4331 - Add support for SBT 2.* export by @Gedochao in #4327
- Add JUnit 5 / Jupiter support by @Gedochao in #4304
Fixes
- Restore BSP base directory to the original workspace regardless of permissions/ownership by @Gedochao in #4273
- Improve dependency update actionable diagnostic handling for slow/unresponsive custom repositories by @Gedochao in #4272
- Improve error for when JVM-only dependencies are not found on other platforms by @Gedochao in #4281
- Don't save duplicate
.scalafmt.confif unnecessary by @Gedochao in #4291
Deprecations and removals
Build and internal changes
- Compile the
directives-parserexample in Scala CLI v1.14.0 release notes by @Gedochao in #4278 - Retire legacy
KEYGRIPsecret by @Gedochao in #4275 update-installation-script,update-centosandupdate-debiancan't run in parallel by @Gedochao in #4277- Track threads & futures spawned in integration tests to make sure logs are in chronological order by @Gedochao in #4293
- Mark Scala 2 nightly tests as flaky by @Gedochao in #4317
- Disable test parallelism for unit tests on the CI by @Gedochao in #4316
- Ensure scala-cli.sh logs to stderr by @alexarchambault in #4301
- Add an extra test for VS detection on Windows + a small refactor by @Gedochao in #4328
- Cut MacOS integration tests down to just sanity tests by @Gedochao in #4333
- Add anti-regression tests for #4329 by @Gedochao in #4332
- Treat Mill wrapper changes as build changes by @Gedochao in #4347
Updates
- Update scala-cli.sh launcher for 1.14.0 by @github-actions[bot] in #4274
- Bump the npm-dependencies group in /website with 3 updates by @dependabot[bot] in #4279
- Bump webpack-dev-server from 5.2.2 to 5.2.4 in /website by @dependabot[bot] in #4280
- Bump the npm-dependencies group in /website with 2 updates by @dependabot[bot] in #4287
- Bump
scalafmtto 3.11.1 (was 3.11.0) by @Gedochao in #4290 - Bump Scala 3 Next RC to 3.8.4-RC3 by @Gedochao in https://g...
v1.14.0
Change default Scala Native version to 0.5.11
This Scala CLI version switches the default Scala Native version to 0.5.11.
Support for .test.java
*.test.java files are now picked up as test-scope sources automatically, mirroring *.test.scala.
Under the hood, Scala CLI generates a matching .java source (so Example.test.java generates a matching Example.java source), so that javac accepts the public class.
//> using test.dep junit:junit:4.13.2
//> using test.dep com.novocode:junit-interface:0.11
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class ExampleTest {
@Test public void foo() { assertEquals(4, 2 + 2); }
}scala-cli test java-junit-exampleA toggle to turn auto-IDE-setup off
Build commands (such as compile, run, test) automatically write the BSP configuration under .bsp/ to keep IDE integration in sync.
This behavior can now be disabled per-invocation via --auto-setup-ide=false, or globally via the ide.auto-setup config key.
scala-cli compile java-junit-example --auto-setup-ide=false
# Compile without generating .bsp/ configurationscala-cli config ide.auto-setup false
# Disable auto-setup-ide globally for all build commandsNew directives-parser module
The legacy Java using_directives parser has been replaced with a Scala-rewritten directives-parser module.
This is transparent to users, but resolves long-standing directive parsing issues (#2443, #3019, #2382) and unblocks future improvements to directive handling.
The directives parser can be used as a standalone library, so you can now parse using directives in your own tools and applications with the same logic as Scala CLI.
//> using scala 3
//> using dep org.virtuslab.scala-cli::directives-parser:1.14.0
import scala.cli.parse.UsingDirectivesParser
@main def parseDirectives(): Unit =
val source =
"""//> using scala 3.7.4
|//> using dep com.lihaoyi::os-lib:0.11.4
|//> using options -Wunused:all -deprecation
|
|@main def hello() = println("Hello")
|""".stripMargin
val result = UsingDirectivesParser.parse(source.toCharArray)
for d <- result.directives do
val values = d.values.map(_.stringValue).mkString(", ")
println(s"${d.key} = $values (line ${d.keyPosition.line})")
if result.diagnostics.nonEmpty then
println("Diagnostics:")
result.diagnostics.foreach(println)Typelevel Toolkit 0.2.0 (with Scala Native)
The Typelevel Toolkit dependency has been bumped to 0.2.0 and is now compatible with Scala Native 0.5.x.
It's worth mentioning that its test framework has been swapped from MUnit to Weaver.
//> using toolkit typelevel:default
//> using platform native
import cats.effect.*
import weaver.*
object HelloSuite extends SimpleIOSuite:
test("hello") {
IO("Hello").map(expect.eql(_, "Hello"))
}Features
- Migrate from old
using_directivesto Scala-rewrittendirectives-parsermodule by @Gedochao in #4192 - Allow to disable auto-setup-ide in build commands with a command line option & config by @Gedochao in #4258
- Support for
.test.javaby @Gedochao in #4261
Fixes
- Prevent duplicate
publish.credentialsandrepositories.credentialsfrom being saved to the config database by @Gedochao in #4257
Build and internal changes
- Fix
scala-cli-archive-keyring.gpggeneration; auto generateKEY.gpgforscala-cli-packagesby @Gedochao in #4238 - Fix
sclicheck.GifTests.complete-installtiming out by @Gedochao in #4236 - Split the
update-packagesCI job down into individual targets by @Gedochao in #4259 - Add explicit overrides in ScalaCliScalafixModule by @Gedochao in #4267
Documentation changes
Updates
- Update scala-cli.sh launcher for 1.13.0 by @github-actions[bot] in #4232
- Bump @algolia/client-search from 5.50.1 to 5.50.2 in /website in the npm-dependencies group by @dependabot[bot] in #4242
- Bump @algolia/client-search from 5.50.2 to 5.51.0 in /website in the npm-dependencies group by @dependabot[bot] in #4247
- Bump postcss from 8.5.6 to 8.5.12 in /website by @dependabot[bot] in #4248
- Bump the npm-dependencies group in /website with 5 updates by @dependabot[bot] in #4251
- Bump Mill to 1.1.6 (was 1.1.5) by @Gedochao in #4254
- Bump Scala Native to 0.5.11 (was 0.5.10) by @Gedochao in #4253
- Bump Scala 3 Next RC to 3.8.4-RC2 by @Gedochao in #4243
- Bump fast-uri from 3.1.0 to 3.1.2 in /website by @dependabot[bot] in #4263
- Bump @babel/plugin-transform-modules-systemjs from 7.28.5 to 7.29.4 in /website by @dependabot[bot] in #4264
- Bump the npm-dependencies group in /website with 3 updates by @dependabot[bot] in #4265
- Bump Typelevel Toolkit to 0.2.0 and enable it for Scala Native 0.5.* by @Gedochao in #4244
- Bump Scala toolkit to 0.9.2 (was 0.8.0) by @Gedochao in #4268
- Bump coursier to 2.1.25-M25 by @Gedochao in #4266
Full Changelog: v1.13.0...v1.14.0
v1.13.0
Change default Scala version to 3.8.3
This Scala CLI version switches the default Scala version to 3.8.3.
scala-cli version
# Scala CLI version: 1.13.0
# Scala version (default): 3.8.3Support for Scala.js 1.21.0
This Scala CLI version adds support for Scala.js 1.21.0.
scala-cli -e 'println("Hello")' --js
# Compiling project (Scala 3.8.3, Scala.js 1.21.0)
# Compiled project (Scala 3.8.3, Scala.js 1.21.0)
# HelloAmmonite REPL deprecated & scheduled for removal
The Ammonite-backed REPL integration is now deprecated and planned for removal (in sync with Ammonite's official communication).
Flags such as --ammonite, --ammonite-version, and --ammonite-arg on scala-cli repl will go away in a future release.
It's time to move on to the default Scala REPL.
java-test-runner for pure Java tests
Projects with only Java sources (no Scala in the build) now use a dedicated java-test-runner module when running scala-cli test.
The new runner wires up Java-friendly test frameworks (such as JUnit via junit-interface) without pulling the Scala test runner or Scala itself onto the test classpath.
//> using test.dep junit:junit:4.13.2
//> using test.dep com.novocode:junit-interface:0.11
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class JavaTestRunnerExample {
@Test
public void foo() {
assertEquals(4, 2 + 2);
}
}GraalVM native-image packaging: packaging.graalvmJvmId and packaging.graalvmArgs
GraalVM native-image packaging JVM id and args are now configurable from using directive level.
//> using packaging.packageType graalvm
//> using packaging.graalvmJvmId graalvm-community:23.0.2
//> using packaging.graalvmArgs --no-fallbackAdded by @zrhmn in #4223 & #4225
Features
- Add
java-test-runnermodule to support running tests with pure Java by @Gedochao in #4197 - Support
-opt-inline:helpby @Gedochao in #4215 - Add directive
packaging.graalvmJvmIdby @zrhmn in #4223 - Add additional
packaging.graalvm*directives by @zrhmn in #4225
Deprecations
Fixes
- Add
signed-bysupport to Debian APT repository by @Gedochao in #4207 - Add missing attributes to ivy2 publishing by @Gedochao in #4203
- Fix misc compiler warnings by @Gedochao in #4220
- Make each packaged native image use its own subdirectory under
nativeImageWorkDirwhen cross-packaging by @Gedochao in #4221 - Support formatting
.sbtinputs by @Gedochao in #4195
Build and internal changes
- Skip CI steps irrelevant to committed changes on PRs by @Gedochao in #4208
- Run tests with JDK 26 by @Gedochao in #4214
- Split
release_notes.mdinto a separate test per-release-tag indocs-testsby @Gedochao in #4216
Updates
- Update scala-cli.sh launcher for 1.12.5 by @github-actions[bot] in #4191
- Bump Scala 3 Next RC to 3.8.3-RC3 by @Gedochao in #4194
- Bump dorny/test-reporter from 2 to 3 in the github-actions group by @dependabot[bot] in #4198
- Bump picomatch from 2.3.1 to 2.3.2 in /website by @dependabot[bot] in #4200
- Bump node-forge from 1.3.3 to 1.4.0 in /website by @dependabot[bot] in #4202
- Bump Scala 3 Next to 3.8.3 by @Gedochao in #4204
- Bump brace-expansion from 1.1.12 to 1.1.13 in /website by @dependabot[bot] in #4205
- Bump @algolia/client-search from 5.49.2 to 5.50.0 in /website in the npm-dependencies group by @dependabot[bot] in #4206
- Bump the npm-dependencies group in /website with 2 updates by @dependabot[bot] in #4211
- Bump lodash from 4.17.23 to 4.18.1 in /website by @dependabot[bot] in #4212
- Bump Scala 3 Next RC to 3.8.4-RC1 by @Gedochao in #4213
- Bump Mill to 1.1.5 (was 1.1.3) by @Gedochao in #4217
- Bump the npm-dependencies group in /website with 6 updates by @dependabot[bot] in #4226
- Bump follow-redirects from 1.15.11 to 1.16.0 in /website by @dependabot[bot] in #4227
- Bump announced Scala 3 Next RC version to 3.8.4-RC1 by @Gedochao in #4219
- Bump
scalafmtto 3.11.0 (was 3.10.7) by @Gedochao in #4228 - Bump Scala.js to 1.21.0 by @Gedochao in #4229
New Contributors
Full Changelog: v1.12.5...v1.13.0
v1.12.5
--cross support for run, package and doc sub-commands (experimental ⚡️)
It is now possible to cross-run, cross-package and cross-generate docs (doc) with the --cross command line
option.
runruns each configured combination of Scala version and platform (e.g. JVM, Native, JS) in sequence;packageproduces one artifact per cross build, with the Scala version and platform in the artifact name;docgenerates Scaladoc for each cross target into separate output directories.
//> using scala 3.3 3.8
@main def main() = println("Hello")scala-cli run cross.scala --cross --power
scala-cli package cross.scala --cross --power
scala-cli doc cross.scala --cross -o doc-out --powerAdded by @Gedochao in #3808, #4171 & #4183
Global --offline config key
You can set offline mode globally with the config sub-command, so Scala CLI uses the cache and skips network access
without passing --offline every time.
scala-cli config offline trueWatch extra paths with --watching (experimental ⚡️)
Use the --watching option or //> using watching to have --watch re-run when files or directories outside
your sources change (e.g. config or assets).
scala-cli run . --watch --power --watching ./config --watching ./assetsOr in source:
//> using watching ./config ./assetsLocal .m2 in publish local (experimental ⚡️)
publish local now publishes to your local Maven repository (~/.m2), so other local projects can depend
on the published artifacts via Maven coordinates.
scala-cli publish local . --m2 --powerFeatures
- Run all cross builds when
--crossis passed by @Gedochao in #3808 - Add a global
--offlineconfig key by @Gedochao in #3216 - Support
--crosswith thepackagesub-command by @Gedochao in #4171 - Allow to
--watchextra paths with--watchingby @Gedochao in #4174 - Add support for
--crossin thedocsub-command by @Gedochao in #4183 - Add support for local
.m2inpublish localby @Gedochao in #4179
Fixes
- Use Java 17 mapping when generating docs with Scala 3.8+ with
docby @Gedochao in #4180 - Make test framework discovery on Native more resilient & with better errors by @Gedochao in #4185
- Warn when
.java&.scalasources are used in a mixed compilation with--server=falseby @Gedochao in #4181
Build and internal changes
Updates
- Bump the npm-dependencies group in /website with 3 updates by @dependabot[bot] in #4165
- Bump the github-actions group with 3 updates by @dependabot[bot] in #4164
- Update scala-cli.sh launcher for 1.12.4 by @github-actions[bot] in #4166
- Bump svgo from 3.3.2 to 3.3.3 in /website by @dependabot[bot] in #4168
- Bump immutable from 5.1.4 to 5.1.5 in /website by @dependabot[bot] in #4167
- Bump Mill to 1.1.3 (was 1.1.2) by @Gedochao in #4169
- Bump @algolia/client-search from 5.49.1 to 5.49.2 in /website in the npm-dependencies group by @dependabot[bot] in #4173
- Bump the github-actions group with 4 updates by @dependabot[bot] in #4172
- Update Scala 3 Next RC to 3.8.3-RC2 by @Gedochao in #4175
- Bump undici from 7.18.2 to 7.24.1 in /website by @dependabot[bot] in #4182
- Bump webfactory/ssh-agent from 0.9.1 to 0.10.0 in the github-actions group by @dependabot[bot] in #4187
- Bump
coursierto 2.1.25-M24 by @Gedochao in #4184 - Bump sass from 1.97.3 to 1.98.0 in /website in the npm-dependencies group by @dependabot[bot] in #4188
Full Changelog: v1.12.4...v1.12.5
v1.12.4
This is just a small patch fixing a bug (#4152) breaking Metals support in Scala CLI v1.12.3.
Fixes
Documentation changes
Updates
- Update scala-cli.sh launcher for 1.12.3 by @github-actions[bot] in #4151
Full Changelog: v1.12.3...v1.12.4
v1.12.3
Change default Scala version to 3.8.2
This Scala CLI version switches the default Scala version to 3.8.2.
scala-cli version
# Scala CLI version: 1.12.3
# Scala version (default): 3.8.2Fixes
- Restore Scala 2 nightlies by @Gedochao in #4140
- Fix Scala version validation to accept locally built compiler by @Gedochao in #4141
- Ensure Scala CLI correctly refers to the latest Scala 2.12/2.13 nightly and recovers from errors by @Gedochao in #4142
- Restore GraalVM image support for older CPUs by @Gedochao in #4150
Build and internal changes
- Cut down on integration test suites by @Gedochao in #4123
- Add
coursier/cache-actionon the CI by @Gedochao in #4126 - Don't install Bloop separately on the CI by @Gedochao in #4130
- Migrate to Mill 1.1.2 (was 1.0.6) by @Gedochao in #4086
Documentation changes
- docs: Add release notes for 1.12.2 by @tgodzik in #4111
- Fix shebang in Scala script example by @sake92 in #4117
- Cherry pick #4073, #4072 & #4123 to the
stablebranch by @Gedochao & @andrzejressel in #4129 - Back port of documentation changes to main by @Gedochao in #4134
Updates
- Update scala-cli.sh launcher for 1.12.2 by @github-actions[bot] in #4116
- Bump webpack from 5.103.0 to 5.105.0 in /website by @dependabot[bot] in #4119
- Update sbt, scripted-plugin to 1.12.2 by @scala-steward in #4110
- Bump @algolia/client-search from 5.47.0 to 5.48.0 in /website by @dependabot[bot] in #4121
- Bump Ammonite to 3.0.8 (was 3.0.7) by @Gedochao in #4083
- Update scalafmt-cli_2.13, scalafmt-core to 3.10.7 by @scala-steward in #4125
- Update Scala 3 Next RC to 3.8.2-RC2 by @scala-steward in #4124
- Update os-lib to 0.11.8 by @scala-steward in #4101
- Update munit to 1.2.2 by @scala-steward in #4097
- Update semanticdb-shared_2.13 to 4.14.7 by @scala-steward in #4103
- Update pprint to 0.9.6 by @scala-steward in #4092
- Update asm to 9.9.1 by @scala-steward in #4094
- Update semanticdb-shared_2.13 to 4.15.2 by @scala-steward in #4132
- Update metaconfig-typesafe-config to 0.18.2 by @scala-steward in #4096
- Update jsoniter-scala-core, ... to 2.38.8 by @scala-steward in #4089
- Update scalafix-interfaces to 0.14.5 by @scala-steward in #4088
- Update jsoup to 1.22.1 by @scala-steward in #4093
- Bump dependencies of the docs website (dependabot sync + cleanup) by @Gedochao in #4135
- Bump @svta/cml-utils from 1.0.1 to 1.4.0 in /website by @dependabot[bot] in #4137
- Migrate to Mill 1.1.2 (was 1.0.6) by @Gedochao in #4086
- Update Bloop to 2.0.19 (was 2.0.17) by @scala-steward in #4109
- Bump Scala 3 Next RC to 3.8.2-RC3 by @Gedochao in #4136
- Bump @algolia/client-search from 5.48.1 to 5.49.0 in /website by @dependabot[bot] in #4145
- Bump @svta/cml-structured-field-values from 1.0.1 to 1.1.2 in /website by @dependabot[bot] in #4144
- Bump Scala 3 Next to 3.8.2 by @Gedochao in #4143
- Bump SBT to 1.12.4 by @Gedochao in #4146
- Bump Scala 3 Next RC to 3.8.3-RC1 by @Gedochao in #4147
New Contributors
- @sake92 made their first contribution in #4117
- @andrzejressel made their first contribution in #4129
Full Changelog: v1.12.2...v1.12.3
v1.12.2
Old sonatype snapshot is causing Scala CLI to timeout
Until the recent migration to new Sonatype Central repository there was an older snapshots repository in use. Unfortuntately, last week it started to make requests to it timeout and hang Scala CLI. We decided remove any references to the old repository, so older (one might say ancient) Scala CLI nightly versions will not be available. This was done by @tgodzik in #4106.
Updates
- Bump react and @types/react in /website by @dependabot[bot] in #4079
Full Changelog: v1.12.1...v1.12.2
v1.12.1
Change default Scala version to 3.8.1
This Scala CLI version switches the default Scala version to 3.8.1.
scala-cli version
# Scala CLI version: 1.12.1
# Scala version (default): 3.8.1Change default Scala Native version to 0.5.10
This Scala CLI version switches the default Scala Native version to 0.5.10.
scala-cli -e 'println("Hello from Scala Native 0.5.10!")' --native
# Compiling project (Scala 3.8.1, Scala Native 0.5.10)
# Compiled project (Scala 3.8.1, Scala Native 0.5.10)
# [info] Linking (multithreadingEnabled=detect) (725 ms)
# [info] Discovered 903 classes and 5554 methods after classloading
# [info] Checking intermediate code (quick) (31 ms)
# [info] Multithreading was not explicitly enabled - initial class loading has not detected any usage of system threads. Multithreading support will be disabled to improve performance.
# [info] Linking (multithreadingEnabled=false) (273 ms)
# [info] Discovered 512 classes and 2629 methods after classloading
# [info] Checking intermediate code (quick) (7 ms)
# [info] Discovered 493 classes and 2002 methods after optimization
# [info] Optimizing (debug mode) (447 ms)
# [info] Produced 12 LLVM IR files
# [info] Generating intermediate code (826 ms)
# [info] Compiling to native code (5461 ms)
# [info] Linking with [pthread, dl, m]
# [info] Linking native code (immix gc, none lto) (257 ms)
# [info] Postprocessing (0 ms)
# [info] Total (7688 ms)
# Hello from Scala Native 0.5.10!Fixes
- fix: openjdk:17-slim is not available. using 17.0.2-slim instead by @kaplan-shaked in #4057
Build and internal changes
- Fix Scala 2.13 nightly tests by @Gedochao in #4063
- Switch the CI to GitHub Linux arm64 runners by @Gedochao in #4064
Updates
- Bump @algolia/client-search from 5.46.2 to 5.46.3 in /website by @dependabot[bot] in #4062
- Update scala-cli.sh launcher for 1.12.0 by @github-actions[bot] in #4054
- Bump
scalafmtto 3.10.4 (was 3.10.2) by @Gedochao in #4061 - Bump
jgitto 7.5.0.202512021534-r (was 7.3.0.202506031305-r) by @Gedochao in #4058 - Bump Scala Toolkit to 0.8.0 (was 0.7.0) by @Gedochao in #4060
- Bump lodash from 4.17.21 to 4.17.23 in /website by @dependabot[bot] in #4066
- Bump Scala 3 Next to 3.8.1 by @Gedochao in #4065
- Switch from
graalvm-java17tograalvm-communityby @Gedochao in #3459 - Bump Ammonite to 3.0.7 (was 3.0.6) by @Gedochao in #4070
- Bump Scala 3 Next RC to 3.8.2-RC1 by @Gedochao in #4071
- Bump Scala Native to 0.5.10 (was 0.5.9) by @Gedochao in #4078
New Contributors
- @kaplan-shaked made their first contribution in #4057
Full Changelog: v1.12.0...v1.12.1
v1.12.0
Change default Scala version to 3.8.0
This Scala CLI version switches the default Scala version to 3.8.0.
scala-cli version
# Scala CLI version: 1.12.0
# Scala version (default): 3.8.0Support for Scala.js 1.20.2
This Scala CLI version adds support for Scala.js 1.20.2.
scala-cli -e 'println("Hello")' --js
# Compiling project (Scala 3.8.0, Scala.js 1.20.2)
# Compiled project (Scala 3.8.0, Scala.js 1.20.2)
# HelloNew aliases for RC and nightly Scala versions
This Scala CLI version introduces dedicated aliases for calling the latest Scala Release Candidate versions in a given series (including LTS).
scala-cli -e 'println(scala.util.Properties.versionNumberString)' -S rc
# 3.8.1-RC1
scala-cli -e 'println(scala.util.Properties.versionNumberString)' -S 3.rc
# 3.8.1-RC1
scala-cli -e 'println(scala.util.Properties.versionNumberString)' -S 3.8.rc
# 3.8.1-RC1
scala-cli -e 'println(dotty.tools.dotc.config.Properties.simpleVersionString)' -S 3.lts.rc --with-compiler
# 3.3.7-RC2
scala-cli -e 'println(dotty.tools.dotc.config.Properties.simpleVersionString)' -S lts.rc --with-compiler
# 3.3.7-RC2Dedicated default and LTS nightly aliases are also provided.
scala-cli -e 'println(scala.util.Properties.versionNumberString)' -S nightly
# 3.8.2-RC1-bin-20260115-6151803-NIGHTLY
scala-cli -e 'println(dotty.tools.dotc.config.Properties.simpleVersionString)' -S lts.nightly --with-compiler
# 3.3.8-RC1-bin-20260112-d35b2d4-NIGHTLY-git-d35b2d4
scala-cli -e 'println(dotty.tools.dotc.config.Properties.simpleVersionString)' -S 3.lts.nightly --with-compiler
# 3.3.8-RC1-bin-20260112-d35b2d4-NIGHTLY-git-d35b2d4Also note that there is no easy way to identify an RC for Scala 2 / 2.12 / 2.13 (as a particular nightly serves as the RC for those Scala distributions).
A reasonable error is also provided when it is requested.
scala-cli -e 'println(scala.util.Properties.versionNumberString)' -S 2.rc
# Invalid Scala version: 2.rc. In the case of Scala 2, a particular nightly version serves as a release candidate.
scala-cli -e 'println(scala.util.Properties.versionNumberString)' -S 2.12.rc
# Invalid Scala version: 2.12.rc. In the case of Scala 2, a particular nightly version serves as a release candidate.
scala-cli -e 'println(scala.util.Properties.versionNumberString)' -S 2.13.rc
# Invalid Scala version: 2.13.rc. In the case of Scala 2, a particular nightly version serves as a release candidate.Added by @Gedochao in #4042 and #4016
(⚡️ experimental) Support for exporting to Mill 1.0.x and overriding the Mill version with --mill-version
The export sub-command now allows to export to Mill 1.0.x projects.
@main def main() = println("Let's export to Mill 1.0.6!")scala-cli export mill-1-0-6-export.scala --mill --mill-version 1.0.6 --power
# Exporting to a mill project...
# Exported to: ~/mill-export/destFeatures & improvements
- Add
rc&*.rcScala version aliases by @Gedochao in #4016 - Support
export-ing to Mill 1.x.y & allow to override Mill version with--mill-versionby @Gedochao in #4028 - Improve Scala nightly version handling & add
lts.nightly,3.lts.nightlyandnightlyScala version tags by @Gedochao in #4042
Fixes
- Fix Scala 3.nightly and 3.latest-minor.nightly to consistently point to the same version by @Gedochao in #4014
- fix #4005 - Windows native-image compile failure caused by SUBST collision by @philwalk in #4006
Documentation changes
- Solve docs' website warnings by @Gedochao in #4007
- Back port of documentation changes to main by @github-actions[bot] in #4015
Build and internal changes
- Enable Scala Native tests with the
testcommand on Scala 3 by @Gedochao in #4018 - Self-contained docker build with ARM64 publishing by @keynmol in #3962
Updates
- Update scala-cli.sh launcher for 1.11.0 by @github-actions[bot] in #4004
- Bump Ammonite to 3.0.6 (was 3.0.5) by @Gedochao in #4008
- Bump actions/download-artifact from 6 to 7 by @dependabot[bot] in #4009
- Bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in #4010
- Bump sass from 1.95.0 to 1.96.0 in /website by @dependabot[bot] in #4011
- Bump
react&react-domfrom 19.2.1 to 19.2.3 in /website by @dependabot[bot] in #4012 - Bump Mill to 0.12.17 (was 0.12.16) by @Gedochao in #4020
- Bump Scala Next RC to 3.8.0-RC4 by @Gedochao in #4021
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #4024
- Bump qs from 6.14.0 to 6.14.1 in /website by @dependabot[bot] in #4032
- Bump @algolia/client-search from 5.46.0 to 5.46.2 in /website by @dependabot[bot] in #4030
- Bump sass from 1.96.0 to 1.97.1 in /website by @dependabot[bot] in #4027
- Bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in #4023
- Bump actions/download-artifact from 6 to 7 by @dependabot[bot] in #4022
- Bump react-player from 2.16.1 to 3.4.0 in /website by @dependabot[bot] in #4025
- Bump Scala 3 Next RC to 3.8.0-RC5 by @Gedochao in #4033
- Migrate to Mill 1.0.6 (was 0.12.17) by @Gedochao in #4019
- Bump libsodium to 1.0.21 (partially, except for static launchers locked at 1.0.18) by @Gedochao in #4041
- Bump
coursierto 2.1.25-M23 by @Gedochao in #4037 - Bump Scala 3 Next RC to 3.8.0-RC6 by @Gedochao in #4039
- Bump Scala.js to 1.20.2 by @Gedochao in #4040
- Bump sass from 1.97.1 to 1.97.2 in /website by @dependabot[bot] in #4038
- Bump alpine to 3.23 & relevant libsodium to 1.0.20 by @Gedochao in #4047
- Bump @types/react from 19.2.7 to 19.2.8 in /website by @dependabot[bot] in #4048
- Bump Scala 3 Next to 3.8.0 by @Gedochao in #4049
- Bump Scala 3 Next RC to 3.8.1-RC1 by @Gedochao in #4051
- Bump undici from 7.16.0 to 7.18.2 in /website by @dependabot[bot] in #4050
Full Changelog: v1.11.0...v1.12.0
v1.11.0
Change default Scala versions to 2.13.18 and 2.12.21
This Scala CLI version switches the default Scala versions:
- default Scala 2.13 to 2.13.18
- default Scala 2.12 to 2.12.21
Added by @Gedochao in #3999 and #3958
Fall back to a legacy version of the runner & test-runner modules for JVM < 17
The newest versions of the runner and test-runner modules will require Java 17 or newer to run.
When trying to use them with older JVMs, Scala CLI will now print a warning and fall back to using legacy versions of those modules instead.
scala-cli test . --jvm 11
# Compiling project (Scala 3.7.4, JVM (11))
# Compiled project (Scala 3.7.4, JVM (11))
# [warn] Java 11 is no longer supported by the test-runner module.
# [warn] Defaulting to a legacy test-runner module version: 1.7.1.
# [warn] To use the latest test-runner, upgrade Java to at least 17.Features & improvements
Fixes
- fix for 3307 (windows launcher rejects filenames with utf8 chars) by @philwalk in #3923
- Allow for repeatable
-XX:*Java options by @Gedochao in #3976 - fix #3979 by adding save-and-restore to generated run-native-image.bat by @philwalk in #3981
- Fix handling of multiple exclude directives by @tom91136 in #3984
- Fix doc generation for projects with compile-only dependencies by @Gedochao in #3990
- Rewrite Scala.js linking to enable packaging of projects without a main method by @Gedochao in #3992
Deprecations
Documentation changes
- Add examples for passing REPL options via using directive to the docs by @Gedochao in #3975
- Back port of documentation changes to main by @github-actions[bot] in #3978
Build and internal changes
- Increase CI timeout for integration tests to 150 minutes by @Gedochao in #3955
- Run the entire REPL test suite on both Ammonite and Scala 3 REPL by @Gedochao in #3982
- Clean cached JDKs on Linux CI runners by @Gedochao in #3995
Updates
- Update scala-cli.sh launcher for 1.10.1 by @github-actions[bot] in #3954
- Bump sass from 1.93.3 to 1.94.0 in /website by @dependabot[bot] in #3960
- Bump Scala 2.13 to 2.13.18 (was 2.13.17) by @Gedochao in #3958
- Bump
ammoniteto 3.0.4 (was 3.0.3) by @Gedochao in #3969 - Bump actions/checkout from 5 to 6 by @dependabot[bot] in #3973
- Bump sass from 1.94.0 to 1.94.2 in /website by @dependabot[bot] in #3974
- Bump misc dependencies by @Gedochao in #3971
- Bump Scala 3 Next RC to 3.8.0-RC1 by @Gedochao in #3957
- Update
bloopto 2.0.17 (was 2.0.15) andbloop-configto 2.3.3 (was 2.3.2) by @Gedochao in #3970 - Bump node-forge from 1.3.1 to 1.3.2 in /website by @dependabot[bot] in #3980
- Bump Scala 3 Next RC to 3.8.0-RC2 by @Gedochao in #3977
- Bump Scala.js deps by @Gedochao in #3983
- Bump mdast-util-to-hast from 13.0.2 to 13.2.1 in /website by @dependabot[bot] in #3986
- Bump @easyops-cn/docusaurus-search-local from 0.52.1 to 0.52.2 in /website by @dependabot[bot] in #3985
- Bump misc dependencies by @Gedochao in #3987
- Bump
scala-js-clito 1.20.1.1 (was 1.20.1) by @Gedochao in #3989 - Bump sass from 1.94.2 to 1.95.0 in /website by @dependabot[bot] in #3998
- Bump
react&react-domfrom 19.2.0 to 19.2.1 in /website by @dependabot[bot] in #3997 - Bump
coursierto 2.1.25-M21 by @Gedochao in #4000 - Bump
scala-cli-signingto 0.2.13 &coursier-publishto 0.4.4 by @Gedochao in #3988 - Bump Ammonite to 3.0.5 by @Gedochao in #4001
- Bump Scala 3 Next RC to 3.8.0-RC3 by @Gedochao in #3991
- Bump Scala 2.12 to 2.12.21 by @Gedochao in #3999
New Contributors
Full Changelog: v1.10.1...v1.11.0