Skip to content

v0.1.20

Compare
Choose a tag to compare
@Gedochao Gedochao released this 18 Jan 07:55
· 1052 commits to main since this release
112c02a

Add support for Scala Toolkit

Scala CLI now has support for Scala Toolkit.

Scala Toolkit is an ongoing effort by Scala Center and VirtusLab to compose a set of approachable libraries to solve everyday problems.
It is currently in its pre-release phase and includes the following libraries:

  • MUnit for testing;
  • Sttp for HTTP client;
  • UPickle/UJson for reading, writing and operating on JSONs;
  • OS-Lib for operating on files and the operating system.

You can add it to your build from the command line with the --with-toolkit option.

scala-cli . --with-toolkit latest

There's also an appropriate using directive.

//> using toolkit "0.1.4"

Added by @lwronski in #1768

Scala CLI is built with Scala 3.2.2

We now rely on Scala 3.2.2 as the default internal Scala version used to build the project.

Added by @lwronski and @Gedochao in #1772

Removal of the about and doctor sub-commands

The about command has been removed, its features merged back to the version command.
As a result, the version command will now check if your locally installed Scala CLI is up-to-date.
It is possible to skip the check with the --offline option, or when printing raw CLI or default Scala
versions with --cli-version and --scala-version, respectively.

scala-cli version --offline                     
# Scala CLI version: 0.1.20
# Scala version (default): 3.2.2

Similarly, the doctor sub-command has been removed, with its past and previously planned functionalities to be delivered
in a more interactive manner in the future.

Added by @Gedochao in #1744

The Scala CLI aarch64/arm64 binary is now available via sdkman

You can now get the platform-appropriate Scala CLI binary on aarch64/arm64 architecture via sdkman.

Added by @mkurz in #1748

aarch64/arm64 artifact with the launcher script

The scala-cli.sh launcher script now correctly downloads the aarch64/arm64 artifact on the appropriate architecture.

Added by @mkurz in #1745

Run a .jar file as a regular input

JARs can now be run just like any other input, without the need of passing the -cp option.

scala-cli Hello.jar
# Hello

Added by @lwronski in #1738

Java properties without the need for --java-prop

The --java-prop option can be skipped when passing Java properties to Scala CLI now.

scala-cli Hello.scala -Dfoo=bar

Added by @lwronski in #1739

Docker packaging with using directives

It is now possible to configure packaging into a docker image via using directives.

//> using packaging.dockerFrom "openjdk:11"
//> using packaging.dockerImageTag "1.0.0"
//> using packaging.dockerImageRegistry "virtuslab"
//> using packaging.dockerImageRepository "scala-cli"

Added by @lwronski in #1753

Pass GraalVM args via a using directive

It is now possible to pass args to GraalVM via the following using directive:

//> using packaging.graalvmArgs "--no-fallback", "--enable-url-protocols=http,https"

Added by @lwronski in #1767

Other changes

SIP-related changes

  • Remove irrelevant options from version help message by @lwronski in #1737
  • Include launcher options in the help for the default and help sub-commands by @Gedochao in #1725
  • Remove suffix .aux from progName when installed by cs by @lwronski in #1736
  • Don't fail in case of connection errors in the version sub-command by @Gedochao in #1760
  • Set workspace dir to os.tmp.dir for virtual sources by @lwronski in #1771
  • Add support for deprecated Scala 2.13.x-specific scala runner options by @Gedochao in #1774
  • Add support for the -with-compiler runner option by @Gedochao in #1780

Fixes

Build and internal changes

Documentation updates

Updates & maintenance

New Contributors

Full Changelog: v0.1.19...v0.1.20