Releases: VirtusLab/scala-cli
v1.10.1
This is a bugfix release, chiefly aiming to mend #3949, which affected several of our users.
Fixes
Documentation changes
- Back port of documentation changes to main by @github-actions[bot] in #3948
Build and internal changes
Updates
- Bump Node to 24 for the docs website by @Gedochao in #3947
- Update scala-cli.sh launcher for 1.10.0 by @github-actions[bot] in #3946
Full Changelog: v1.10.0...v1.10.1
v1.10.0
Change default Scala versions to 3.7.4 and 2.13.17
This Scala CLI version switches the default Scala versions:
- default Scala 3 to 3.7.4
- default Scala 2.13 to 2.13.17
scala-cli version
# Scala CLI version: 1.10.0
# Scala version (default): 3.7.4Added by @Gedochao in #3942 and #3895
Support for the new Scala 3.8 REPL
As per scala/scala3#24243, Scala 3 REPL has been extracted to a separate artifact in Scala 3.8, as a result of which the use of the REPL command with Scala 3.8.0-RC1-bin-20251101-389483e-NIGHTLY or newer will require upgrading Scala CLI at least to 1.10 to work.
scala-cli repl
# Welcome to Scala 3.8.0-RC1-bin-20251101-389483e-NIGHTLY (23.0.1, Java OpenJDK 64-Bit Server VM).
# Type in expressions for evaluation. Or try :help.
#
# scala> Support for adding extra directories to a Docker image
This feature adds the ability to include additional directories in Docker images. Users can now specify extra directories to be copied into a Docker image during the build process. The directories can be passed with the --docker-extra-directories command line option or //> using packaging.dockerExtraDirectories directive.
//> using packaging.dockerExtraDirectories path/to/directory1 path/to/directory2scala-cli --power package . --docker --docker-image-repository repo --docker-extra-directories path/to/directoryAdded by @btomala and @Gedochao in VirtusLab/scala-packager#250 and #3908
Deprecate support for building GraalVM native images with Scala pre-3.3
When building GraalVM native images with Scala CLI and Scala versions older than 3.3.0, the following warning will now be printed:
# [warning] building native images with Scala 3 older than 3.3.0 is deprecated.
# [warning] support will be dropped in a future Scala CLI version.
# [warning] it is advised to upgrade to a more recent Scala versionWhile the native images will still be built, the functionality will be removed in a future Scala CLI version. It is advised to migrate projects to Scala 3.3 or newer.
Additionally, the following modules have been dropped and will no longer be published:
scala3-runtimescala3-graalscala3-graal-processor
As they remain necessary for building native images for Scala pre-3.3 projects, their usage has been deprecated and frozen at respective version 1.9.1.
Stop publishing certain modules for Scala 2
While it is technically an internal change, it is worth noting certain Scala CLI modules will no longer be published for Scala 2.
Those include:
runnertest-runnertasty-libconfigspecification-level
From this point on, they will only be published for Scala 3.
Added by @Gedochao in #3911 and #3912
Features
- Bump
scala-packagerto 0.2.1 & enable adding extra directories to a docker image by @Gedochao & @btomala in #3908 - Add support for the new Scala 3.8 REPL by @Gedochao in #3936
Fixes
- Ensure non-self executable JVM launchers'
setup-ideproduces working BSP connection JSON by @Gedochao in #3876 - Fix test scope resources to not be added to the main scope by @Gedochao in #3898
Documentation changes
- Suggest using ivy2Local in the documentation by @przemek-pokrywka in #3902
Build and internal changes
- Run the default (Scala 3 Next) suite with the JVM bootstrapped launcher on the CI by @Gedochao in #3872
- Run JDK tests for Java 25 by @Gedochao in #3874
- Update MacOS CI by @Gedochao in #3885
- Add
.cursorto.gitignoreby @Gedochao in #3893 - Unify
climodule unit tests with consistent logging, timeouts and other settings by @Gedochao in #3896 - Cross compile the
runnerandtest-runnermodules against Scala 3 Next versions by @Gedochao in #3927 - Migrate integration tests to Scala 3 by @Gedochao in #3926
- Misc unit test fixes by @Gedochao in #3931
- Temporarily tag CLI docker image tests as flaky by @Gedochao in #3939
- Temporarily tag CLI docker image documentation tests as flaky by @Gedochao in #3940
- Temporarily disable some more flaky CLI docker image documentation tests by @Gedochao in #3941
- Drop Scala 2 in
runner,test-runnerandtasty-libmodules by @Gedochao in #3911 - Drop Scala 2 in
configandspecification-levelmodules & bumpjsoniter-scalato 2.38.2 (was 2.13.5.2) by @Gedochao in #3912 - NIT Fix miscellaneous warnings by @Gedochao in #3913
- NIT Fix more miscellaneous warnings by @Gedochao in #3920
- Drop
scala3-runtime,scala3-graal&scala3-graal-processor& deprecate pre-Scala-3.3 native images by @Gedochao in #3929
Updates
- Update scala-cli.sh launcher for 1.9.1 by @github-actions[bot] in #3871
- Bump sass from 1.92.1 to 1.93.0 in /website by @dependabot[bot] in #3878
- Bump Mill to 0.12.16 (was 0.12.15) by @Gedochao in #3881
- Bump Munit to 1.2.0 by @Gedochao in #3883
- Bump Scala 3 Next RC to 3.7.4-RC1 by @Gedochao in #3887
- Bump sass from 1.93.0 to 1.93.2 in /website by @dependabot[bot] in #3889
- Bump Scala 2.13 to 2.13.17 by @Gedochao in #3895
- Bump Node to 24 &
@docusaurus/*to 3.9.1 by @Gedochao in #3899 - Bump Scala 2.13 to 2.13.17 on the CI by @Gedochao in #3900
- Bump
coursierto 2.1.25-M19 by @Gedochao in #3884 - Bump internal Scala version to 3.3.7 by @Gedochao in #3906
- Bump Ammonite to 3.0.3 by @Gedochao in #3909
- Migrate from old
coursierAPIs by @Gedochao in #3910 - Bump actions/setup-node from 5 to 6 by @dependabot[bot] in #3915
- Bump
scala-packagerto 0.2.1 & enable adding extra directories to a docker image by @Gedochao & @btomala in #3908 - Bump Scala Native to 0.5.9 by @Gedochao in #3918
- Bump react from 19.1.1 to 19.2.0 in /website by @dependabot[bot] in #3904
- Bump
docusaurusto 3.9.2 (was 3.9.1) by @Gedochao in #3919 - Bump actions/download-artifact from 5 to 6 by @dependabot[bot] in #3924
- Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #3925
- Bump Scala 3 Next RC to 3.7.4-RC3 by @Gedochao in #3928
- Bump
python-native-libsto 0.2.5 (was 0.2.4) by @Gedochao in #3932 - Bump Scala 3 Next to 3.7.4 by @Gedochao in #3942
- Bump expecty to 0.17.1 (was 0.17.0) by @Gedochao in #3938
- Bump sass from 1.93.2 to 1.93.3 in /website by @dependabot[bot] in #3935
New Contributors
- @przemek-pokrywka made their first contribution in #3902
Full Changelog: v1.9.1...v1.10.0
v1.9.1
Support for Scala 3.7.3
This Scala CLI version switches the default Scala version to 3.7.3.
scala-cli version
# Scala CLI version: 1.9.1
# Scala version (default): 3.7.3Support for Scala.js 1.20.1
This Scala CLI version adds support for Scala.js 1.20.1.
scala-cli -e 'println("Hello")' --js
# Compiling project (Scala 3.7.3, Scala.js 1.20.1)
# Compiled project (Scala 3.7.3, Scala.js 1.20.1)
# HelloAdded by @Gedochao in #3861 and VirtusLab/scala-js-cli#160
Fixes
- Fix completely broken lock during setting up local repo on Linux by @unlsycn in #3846
- Ensure
publishactually fails on a failed upload by @Gedochao in #3853
Updates
- Update scala-cli.sh launcher for 1.9.0 by @github-actions[bot] in #3851
- Bump sass from 1.90.0 to 1.91.0 in /website by @dependabot[bot] in #3839
- Bump Scala 3 Next RC to 3.7.3-RC3 by @Gedochao in #3854
- Bump
react&react-domfrom 19.1.0 to 19.1.1 in /website by @dependabot[bot] in #3806 - Bump announced Scala 3 Next RC to 3.7.3-RC3 by @Gedochao in #3858
- Bump
jgitto 7.3.0.202506031305-r by @Gedochao in #3856 - Bump Scala.js to 1.20.1 by @Gedochao in #3861
- Bump actions/setup-python from 5 to 6 by @dependabot[bot] in #3863
- Bump Scala Next to 3.7.3 by @Gedochao in #3866
- Bump sass from 1.91.0 to 1.92.1 in /website by @dependabot[bot] in #3864
- Bump @mdx-js/react from 3.1.0 to 3.1.1 in /website by @dependabot[bot] in #3865
- Bump actions/setup-node from 4 to 5 by @dependabot[bot] in #3862
- Bump
scalafmtto 3.9.10 by @Gedochao in #3868
Full Changelog: v1.9.0...v1.9.1
v1.9.0
Support for the new Scala 3 nightly repository
This Scala CLI version supports the new Scala 3 nightly versions repository:
https://repo.scala-lang.org/artifactory/maven-nightlies
This means that newest Scala 3 nightly versions will become available to use with Scala CLI, as well as the 3.nightly tag will now refer to the actual, newest version.
As a result, Scala 3.8 features like capture checked Scala 3 library should now be available from Scala CLI.
//> using scala 3.8.0-RC1-bin-20250901-ca400bd-NIGHTLY
import language.experimental.captureChecking
trait File extends caps.SharedCapability:
def count(): Int
def f(file: File): IterableOnce[Int]^{file} =
Iterator(1)
.map(_ + file.count())Features
Fixes
Documentation changes
- Update the Scala CLI docs landing page by @Gedochao in #3825
- Back port of documentation changes to main by @github-actions[bot] in #3826
Build and internal changes
- Prepare for Mill 1.0.x bump by @Gedochao in #3833
- Temporarily disable flaky Spark tests on Mac CI by @Gedochao in #3842
Updates
- Update scala-cli.sh launcher for 1.8.5 by @github-actions[bot] in #3824
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #3827
- Bump sass from 1.89.2 to 1.90.0 in /website by @dependabot[bot] in #3828
- Bump
case-appto 2.1.0 by @Gedochao in #3830 - Bump actions/download-artifact from 4 to 5 by @dependabot[bot] in #3829
- Update sbt, scripted-plugin to 1.11.4 by @scala-steward in #3832
- Update Scala 3 Next RC to 3.7.3-RC2 by @Gedochao in #3834
- Bump
scala-packagerto 0.2.0 by @Gedochao in #3843 - Update announced Scala 3 RC to 3.7.3-RC2 by @Gedochao in #3845
- Update jsoup to 1.21.2 by @scala-steward in #3840
New Contributors
Full Changelog: v1.8.5...v1.9.0
v1.8.5
Support for Scala 3.7.2
This Scala CLI version switches the default Scala version to 3.7.2.
scala-cli version
# Scala CLI version: 1.8.5
# Scala version (default): 3.7.2Add props with input paths for non-script inputs
2 new properties have been added, to provide a way to access input paths outside of .sc scripts:
scala.sources- full paths of all inputs in the project, separated byjava.io.File.pathSeparatorscala.source.names- names of all inputs in the project, separated byjava.io.File.pathSeparator
//PrintSources.scala
@main def main() = {
println(sys.props("scala.sources"))
println(sys.props("scala.source.names"))
}~/PrintSources.scala
PrintSources.scala
These are meant to be an input type agnostic equivalent for the scriptPath method available in .sc scripts.
sonatype:snapshots points to the new Sonatype Central snapshots repository
It is no longer necessary to manually add https://central.sonatype.com/repository/maven-snapshots, it is added under the sonatype:snapshots alias (along with the old snapshot repository).
It is also added in all other contexts when snapshots should be used.
//> using repository sonatype:snapshotsScala CLI nightlies are available again
We once again publish Scala CLI nightlies. You can use the newest version under the nightly tag.
As pre-1.8.5 Scala CLI versions do not look for them on the new Sonatype Central snapshots repository, they will not be visible when called from earlier versions.
scala-cli --cli-version nightly version
# Scala CLI version: 1.8.4-24-g8ca6c960b-SNAPSHOT
# Scala version (default): 3.7.2Note that the new Sonatype Central Portal retains snapshot versions for 90 days, so individual versions will be available to test for a limited time period.
Features
- Automatically add the new Sonatype Central Portal snapshots repository when snapshots are expected to be used by @Gedochao in #3797
- Adjust Scala CLI nightly version resolution for the new Maven Central Snapshots repository by @Gedochao in #3818
- provide a way to access paths of source files by @philwalk in #3799
- Add more logging for publishing by @Gedochao in #3813
Fixes
- fix for 3789 - updated by @philwalk in #3794
- script extension can be either '.sc' or empty string by @philwalk in #3802
Build and internal changes
- Tag tests relying on old snapshots as flaky (or remove them where applicable) by @Gedochao in #3817
- Add
--no-fallbackto graalvm native-image configuration by @lbialy in #3820
Updates
- Bump react-player from 2.16.0 to 2.16.1 in /website by @dependabot[bot] in #3784
- Update scala-cli.sh launcher for 1.8.4 by @github-actions[bot] in #3787
- Update zip-input-stream to 0.1.3 by @scala-steward in #3792
- Update Scala 3 Next RC to 3.7.2-RC2 by @scala-steward in #3791
- Update java-class-name_3 to 0.1.8 by @scala-steward in #3795
- Update Scala 3 Next announced RC to 3.7.2-RC2 by @Gedochao in #3796
- Update publish to 0.4.3 by @scala-steward in #3801
- Update pprint to 0.9.1 by @scala-steward in #3803
- Update pprint to 0.9.3 by @scala-steward in #3805
- Bump @easyops-cn/docusaurus-search-local from 0.51.1 to 0.52.1 in /website by @dependabot[bot] in #3807
- Update fansi to 0.5.1 by @scala-steward in #3804
- Update Scala 3 Next to 3.7.2 by @Gedochao in #3809
- Update mill-main to 0.12.15 by @scala-steward in #3814
- Update
scalametato 4.13.9 by @scala-steward in #3816 - Update scalafmt-cli_2.13, scalafmt-core to 3.9.9 by @scala-steward in #3815
- Update os-lib to 0.11.5 by @scala-steward in #3811
- Set Scala 3.7.2 as the latest announced Scala 3 Next by @Gedochao in #3812
- Bump Bloop to 2.0.13 by @Gedochao in #3821
New Contributors
Full Changelog: v1.8.4...v1.8.5
v1.8.4
(⚡️ experimental) publish support for the Sonatype Central Portal
This Scala CLI version adds support for publishing artifacts to the Sonatype Central Portal via its OSSRH Staging API.
It is once again possible to publish artifacts to Maven Central with Scala CLI.
Both stable and *-SNAPSHOT versions are handled.
The only configuration change necessary is to migrate the Sonatype namespace in the UI and regenerate credentials to the new Sonatype Central Portal, as per Sonatype instructions
scala-cli publish . --powerAdded by @Gedochao in #3774, #3776, #3778, coursier/publish#128 and coursier/publish#127
Better support for the REPL with JDK 24+
When using the REPL with JDK 24 or newer, users should no longer see the warnings about restricted methods of java.lang.System being used.
scala-cli repl --jvm 24
# WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
# WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$ (file:/Users/pchabelski/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3/3.7.1/scala3-library_3-3.7.1.jar)
# WARNING: Please consider reporting this to the maintainers of class scala.runtime.LazyVals$
# WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
# Welcome to Scala 3.7.1 (24.0.1, Java OpenJDK 64-Bit Server VM).
# Type in expressions for evaluation. Or try :help.
#
#
# scala> Note that the deprecated method from sun.misc.Unsafe warning is still present, and will only be addressed in Scala 3.8.0.
Features
publishcommand with Sonatype Central Portal OSSRH Staging API by @Gedochao in #3774- Add support for publishing with Scala CLI to Sonatype Central Portal by @Gedochao in #3776
Fixes
- Prevent the REPL from warning about restricted
java.lang.SystemAPI on JDK 24 by @Gedochao in #3767 - fix for 3725, 3752, 3766 and 3769 by @philwalk in #3726
Documentation changes
Updates
- Update scala-cli.sh launcher for 1.8.3 by @github-actions[bot] in #3765
- Update sbt, scripted-plugin to 1.11.3 by @scala-steward in #3773
- Update
scalafmtto 3.9.8 by @scala-steward in #3771 - Update scalafix-interfaces to 0.14.3 by @scala-steward in #3673
- Bump
coursier/publishto 0.4.2 by @Gedochao in #3778 - Update semanticdb-shared_2.13 to 4.13.8 by @scala-steward in #3770
- Update jimfs to 1.3.1 by @scala-steward in #3779
- Update
scala-cli-signingto 0.2.11 by @scala-steward in #3781
Full Changelog: v1.8.3...v1.8.4
v1.8.3
This is a small release which aims to fix issues with publishing Scala CLI on Sonatype Central Portal.
Build and internal changes
- Add extra logging on Scala CLI artifacts publishing by @Gedochao in #3745
- [NIT] Refactor publishing by @Gedochao in #3743
- Ensure publishing to Sonatype runs without parallelism by @Gedochao in #3755
- Don't use any custom logic when publishing to Sonatype Central by @Gedochao in #3759
- Print artifacts' version when publishing Scala CLI by @Gedochao in #3760
- Don't prepend shell scripts for CLI bootstrapped fatJARs by @Gedochao in #3764
Updates
- Update scala-cli.sh launcher for 1.8.2 by @github-actions in #3744
- Update semanticdb-shared_2.13 to 4.13.7 by @scala-steward in #3746
- Bump @easyops-cn/docusaurus-search-local from 0.50.0 to 0.51.0 in /website by @dependabot in #3748
- Bump brace-expansion from 1.1.11 to 1.1.12 in /website by @dependabot in #3749
- chore: Set latest RC to 3.7.2-RC1 by @tgodzik in #3750
- Bump @easyops-cn/docusaurus-search-local from 0.51.0 to 0.51.1 in /website by @dependabot in #3757
- Update jsoup to 1.21.1 by @scala-steward in #3762
Full Changelog: v1.8.2...v1.8.3
v1.8.2
Due to technical difficulties, this version is not available on Maven Central and on coursier. If you care about those installation methods, please be patient as we resolve the issue and work on a subsequent release.
Support for Scala Native 0.5.8
This Scala CLI version switches the default Scala Native version to 0.5.8.
scala-cli -e 'println("Hello from Scala Native 0.5.8!")' --native
# Compiling project (Scala 3.7.1, Scala Native 0.5.8)
# Compiled project (Scala 3.7.1, Scala Native 0.5.8)
# [info] Linking (multithreadingEnabled=true, disable if not used) (1052 ms)
# [info] Discovered 919 classes and 5640 methods after classloading
# [info] Checking intermediate code (quick) (59 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) (369 ms)
# [info] Discovered 511 classes and 2553 methods after classloading
# [info] Checking intermediate code (quick) (7 ms)
# [info] Discovered 491 classes and 1986 methods after optimization
# [info] Optimizing (debug mode) (519 ms)
# [info] Produced 9 LLVM IR files
# [info] Generating intermediate code (521 ms)
# [info] Compiling to native code (1762 ms)
# [info] Linking with [pthread, dl, m]
# [info] Linking native code (immix gc, none lto) (98 ms)
# [info] Postprocessing (0 ms)
# [info] Total (4379 ms)
# Hello from Scala Native 0.5.8!Added in #3728
Internal and build changes
- Migrate publishing to Sonatype Maven Central by @Gedochao in #3704
- Fix version string of published artifacts by @Gedochao in #3721
Updates
- Update scala-cli.sh launcher for 1.8.1 by @github-actions in #3719
- Bump
sbtto 1.11.1 by @Gedochao in #3723 - Bump deps to versions migrated to Sonatype Maven Central by @Gedochao in #3722
- Update publish_2.13 to 0.2.1 by @scala-steward in #3727
- Bump sass from 1.89.1 to 1.89.2 in /website by @dependabot in #3733
- Bump @easyops-cn/docusaurus-search-local from 0.49.2 to 0.50.0 in /website by @dependabot in #3730
- Bump react and react-dom in /website by @dependabot in #3732
- Bump
scala-cli-signingto 0.2.9 & coursierpublishto 0.3.0 by @Gedochao in #3734 - Bump
docusaurusto 3.8.1 by @Gedochao in #3737 - Bump SBT to 1.11.2 by @Gedochao in #3739
- Update Scala Native to 0.5.8 by @scala-steward in #3728
Full Changelog: v1.8.1...v1.8.2
v1.8.1
Support for Scala 3.7.1
This Scala CLI version switches the default Scala version to 3.7.1.
scala-cli version
# Scala CLI version: 1.8.1
# Scala version (default): 3.7.1Support for URLs in using file directives
It is now possible to use URLs in using file directives, which allows linking sources from the net.
//> using file https://raw.githubusercontent.com/softwaremill/sttp/refs/heads/master/examples/src/main/scala/sttp/client4/examples/json/GetAndParseJsonCatsEffectCirce.scalaAdded during a Scala Tooling Spree by @ivan-klass, @majk-p and @tgodzik in #3681
Features
- Support links in using file directive (implements #1328) by @ivan-klass, @majk-p and @tgodzik in #3681
Fixes
Internal and build changes
- bugfix: Fix mill script on fish by @tgodzik in #3700
- Make
test-fish-shell,test-hypothetical-sbt-exportandbloop-memory-footprintrequired for publishing by @Gedochao in #3701 - [NIT] Refactor Scala CLI CI scripts by @Gedochao in #3702
- Remove the
github-dependency-graphCI workflow by @Gedochao in #3703 - Add more tests for URLs in using file directives by @Gedochao in #3706
Documentation changes
- Fix Changing Java versions document by @tmrkw1497 in #3697
- Back port of documentation changes to main by @github-actions in #3699
Updates
- Update scala-cli.sh launcher for 1.8.0 by @github-actions in #3672
- Update semanticdb-shared_2.13 to 4.13.6 by @scala-steward in #3678
- Bump sass from 1.87.0 to 1.88.0 in /website by @dependabot in #3676
- Bump
java-class-nameto 0.1.6 by @Gedochao in #3679 - Update
scala-cli-signingto 0.2.7 by @scala-steward in #3683 - Update
millscripts by @Gedochao in #3686 - Bump sass from 1.88.0 to 1.89.0 in /website by @dependabot in #3687
- Bump
scala-js-clito 1.19.0.1 by @Gedochao in #3689 - Bump Scala 3 Next RC to 3.7.1-RC2 by @Gedochao in #3692
- Update sbt, scripted-plugin to 1.11.0 by @scala-steward in #3696
- Bump
millto 0.12 by @Gedochao in #3691 - Bump
scalafmtto 3.9.7 & reformat by @Gedochao in #3705 - Bump @docusaurus/preset-classic from 3.7.0 to 3.8.0 in /website by @dependabot in #3709
- Bump sass from 1.89.0 to 1.89.1 in /website by @dependabot in #3710
- Bump Scala Next to 3.7.1 by @Gedochao in #3707
New Contributors
- @unlsycn made their first contribution in #3693
- @tmrkw1497 made their first contribution in #3697
- @ivan-klass made their first contribution in #3681
Full Changelog: v1.8.0...v1.8.1
v1.8.0
Support for Scala 3.7.0 and 3.3.6
This Scala CLI version switches the default Scala version to 3.7.0.
The CLI internals are now built with Scala 3.3.6.
scala-cli version
# Scala CLI version: 1.8.0
# Scala version (default): 3.7.0Support for Scala.js 1.19.0
This Scala CLI version adds support for Scala.js 1.19.0.
scala-cli -e 'println("Hello")' --js
# Compiling project (Scala 3.7.0, Scala.js 1.19.0)
# Compiled project (Scala 3.7.0, Scala.js 1.19.0)
# HelloAdded in #3643 and VirtusLab/scala-js-cli#134
Drop support for Scala <3.3 in runner and test-runner modules
Starting with Scala CLI v1.8.0, the runner and test-runner modules are built with Scala 3.3.6 LTS (on par with other modules built with Scala 3). They used to be built with Scala 3.0.2, as those modules may get added to the project class path when running, respectively, the main scope and tests. This means that if the application is using pre-3.3 Scala 3, TASTy versions will be incompatible.
This is mostly informative, as the change should not be breaking for standard Scala CLI usage, even if an older Scala 3 version is being used. For builds using Scala <3.3, the CLI will automatically fall back to version 1.7.1 of the modules, with an appropriate warning being printed. As the fallback will not be updated in the future, some Scala CLI features might start breaking at some point, as the APIs will stop being fully in sync.
scala-cli -e 'println("Hello")' --runner -S 3.1
# [warn] Scala 3.1.3 is no longer supported by the runner module.
# [warn] Defaulting to a legacy runner module version: 1.7.1.
# [warn] To use the latest runner, upgrade Scala to at least Scala 3.3.
# Compiling project (Scala 3.1.3, JVM (17))
# Compiled project (Scala 3.1.3, JVM (17))
# Helloscala-cli test . -S 3.2
# [warn] Scala 3.2.2 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 Scala to at least 3.3.
# Compiling project (test, Scala 3.2.2, JVM (17))
# Compiled project (test, Scala 3.2.2, JVM (17))
# Test run started
# Test MyTests.foo started
# Hello, world!
# Test MyTests.foo finished, took 0.001 sec
# Test run finished: 0 failed, 0 ignored, 1 total, 0.003sRealistically, the change is only breaking for apps using those modules directly themselves, either depending on them or using them to run things. In either case, it is recommended to update Scala up to at least 3.3 LTS.
Scala CLI now detects and runs multiple test frameworks, rather than just one
When running tests in a project with multiple test frameworks in use, Scala CLI will now attempt to detect and run all of them, rather than just one.
scala-cli test .
# Compiling project (Scala 3.7.0, JVM (23))
# Compiled project (Scala 3.7.0, JVM (23))
# Compiling project (test, Scala 3.7.0, JVM (23))
# Compiled project (test, Scala 3.7.0, JVM (23))
# Munit:
# + foo 0.007s
# -------------------------------- Running Tests --------------------------------
# + MyTests.foo 1ms
# Tests: 1, Passed: 1, Failed: 0
# + SimpleSpec
# Hello from zio-test
# + print hello and assert true
# 1 tests passed. 0 tests failed. 0 tests ignored.
#
# Executed in 97 ms
#
# Completed tests
# ScalaTestSpec:
# example
# - should work
# Run completed in 44 milliseconds.
# Total number of tests run: 1
# Suites: completed 1, aborted 0
# Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
# All tests passed.Additionally, it is now possible to pre-define multiple test frameworks to use (rather than just one, as before).
//> using test.frameworks org.scalatest.tools.Framework munit.Framework custom.CustomFrameworkPre-defining test frameworks may be preferable for bigger projects, as it allows to skip framework detection and run them directly. This is significant particularly for running tests with Scala Native and Scala.js.
Features
- Support the
--testflag with thepublish&publish localsub-commands by @Gedochao in #3538 - Misc no-op and/or error handling for the
--testcommand line flag by @Gedochao in #3586 - Add scala-cli version to the BuildInfo by @yadavan88 in #3617
fixsub-command tweaks by @Gedochao in #3646- Run all found test frameworks, rather than just one by @Gedochao in #3621
- Allow to preconfigure multiple test frameworks by @Gedochao in #3653
- Add support for some missing Scala compiler options & aliases without the need for
-Oby @Gedochao in #3665 - Add support for the --repl-quit-after-init REPL option by @Gedochao in #3664
Fixes
- Fix
fmtto format theproject.scalaconfiguration file as any other Scala input by @Gedochao in #3609 - Apply
scalafixrules to test scope inputs, too by @Gedochao in #3641
Internal and build changes
- Cross compile everything on the CI by @Gedochao in #3570
- Add tests for the current behaviour of
--crossby @Gedochao in #3589 - Run
testsub-command integration tests on default JVM settings by @Gedochao in #3592 - Retry docs' tests on the CI by @Gedochao in #3618
- Move
ScopeOptionstoSharedOptionsby @Gedochao in #3612 - Include missing Scala
3.6.*versions inScala.listAllby @Gedochao in #3652 - Check formatting with Scala CLI, rather than the
scalafmtlauncher itself by @Gedochao in #3660
Documentation changes
- compileOnly option added to the documentation by @yadavan88 in #3600
- Back port of documentation changes to main by @github-actions in #3601
- docs: guide for compile only deps by @scarf005 in #3602
- Back port of documentation changes to main by @github-actions in #3607
- Add missing
usingdirective reference docs by @Gedochao in #3608 - Back port of documentation changes to main by @github-actions in #3610
- Fix formatting in directives' reference docs by @Gedochao in #3611
- Back port of documentation changes to main by @github-actions in #3616
- Fixed DEV.md file related to test command by @yadavan88 in #3619
- Correct doc with --project-version by @joan38 in #3662
Updates
- Bump webfactory/ssh-agent from 0.9.0 to 0.9.1 by @dependabot in #3576
- Bump react from 18.2.0 to 18.3.1 in /website by @dependabot in #3573
- Update scala-cli.sh launcher for 1.7.1 by @github-actions in #3579
- Update guava to 33.4.5-jre by @scala-steward in #3581
- Update bloop-rifle_2.13 to 2.0.9 by @scala-steward in #3580
- Update sbt, scripted-plugin to 1.10.11 by @scala-steward in #3582
- Pin & update docker images by @Gedochao in #3558
- Bump clsx from 1.2.1 to 2.1.1 in /website by @dependabot in #3560
- Bump
docusaurusto 3.7.0 by @Gedochao in #3585 - Bump react-dom from 18.2.0 to 18.3.1 in /website by @dependabot in #3587
- Bump sass from 1.58.3 to 1.86.0 in /website by @dependabot in #3588
- Bump @easyops-cn/docusaurus-search-local from 0.49.1 to 0.49.2 in /website by @dependabot in #3604
- Update asm to 9.8 by @scala-steward in #3606
- Update guava to 33.4.6-jre by @scala-steward in #3605
- Bump sass from 1.86.0 to 1.86.1 in /website by @dependabot in #3603
- Bump @mdx-js/react from 3.0.0 to 3.1.0 in /website by @dependabot in #3575
- Bump sass from 1.86.1 to 1.86.3 in /website by @dependabot in #3622
- Bump estree-util-value-to-estree from 3.0.1 to 3.3.3 in /website by @dependabot in #3623
- Update guava to 33.4.7-jre by @scala-steward in #3625
- Update Scala Next RC to 3.7.0-RC2 by @Gedochao in #3628
- Update core_2.13 to 3.11.0 by @scala-steward in https://github.co...