v0.1.20
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"
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.
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
.
aarch64/arm64
artifact with the launcher script
The scala-cli.sh
launcher script now correctly downloads the aarch64/arm64
artifact on the appropriate architecture.
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
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
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"
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"
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
-specificscala
runner options by @Gedochao in #1774 - Add support for the
-with-compiler
runner option by @Gedochao in #1780
Fixes
- Take into account interactively picked options when caching binaries by @alexarchambault in #1701
- Erase things in working dir in publish by @alexarchambault in #1715
- Improve formatting of generated Mill project by @lolgab in #1677
- Restart Bloop server if it exited by @alexarchambault in #1716
- Add CLI option for suppressing the warning about directives in multiple files by @MaciejG604 in #1754
- Add a global configuration for suppressing the warning about directives in multiple files by @MaciejG604 in #1779
- Set page size for aarch64 Linux binaries to 64k by @mkurz in #1726
Build and internal changes
- Tweaking by @alexarchambault in #1711
- Address some native-image warnings by @alexarchambault in #1719
- Do not generate Linux aarch64 binaries from PRs by @alexarchambault in #1720
- Derive using directives handlers from case classes by @alexarchambault in #1637
- Don't run commands upon HelpTests instantiation by @alexarchambault in #1762
Documentation updates
- Add test-only cookbook by @lwronski in #1718
- Fixing minor typos and some wordsmithing. by @medale in #1731
- Back port of documentation changes to main by @github-actions in #1735
- Explain the differences in using shebang vs scala-cli directly in script by @lwronski in #1740
- Add instruction for Intellij JVM version by @MaciejG604 in #1773
- Fix a broken link by @xerial and @lwronski in #1777
Updates & maintenance
- Update svm to 22.3.0 by @scala-steward in #1689
- Update scala-cli.sh launcher for 0.1.19 by @github-actions in #1707
- Bump VirtusLab/scala-cli-setup from 0.1.18 to 0.1.19 by @dependabot in #1709
- Update Bloop to 1.5.6-sc-1 by @lwronski in #1704
- Update trees_2.13 to 4.7.1 by @scala-steward in #1717
- Update coursier-jvm_2.13, ... to 2.1.0-RC4 by @scala-steward in #1723
- Bump uraimo/run-on-arch-action from 2.3.0 to 2.5.0 by @dependabot in #1734
- Update jsoniter-scala-core_2.13, ... to 2.20.0 by @scala-steward in #1732
- Update jsoniter-scala-core_2.13, ... to 2.20.1 by @scala-steward in #1741
- Update scalafmt-cli_2.13, scalafmt-core to 3.6.1 by @scala-steward in #1742
- Update core_2.13 to 3.8.6 by @scala-steward in #1746
- Update libdaemon to 0.0.11 by @scala-steward in #1759
- Update jsoniter-scala-core_2.13, ... to 2.20.2 by @scala-steward in #1757
- Update core_2.13 to 3.8.7 by @scala-steward in #1758
- Update bloop core to 1.5.6-sc-2 by @lwronski in #1761
- Update core_2.13 to 3.8.8 by @scala-steward in #1770
- Update ammonite to 2.5.6 by @scala-steward in #1769
- Update jsoniter-scala-core_2.13, ... to 2.20.3 by @scala-steward in #1776
- Update amm to 2.5.6-1-f8bff243 by @lwronski in #1778
New Contributors
- @mkurz made their first contribution in #1726
- @medale made their first contribution in #1731
- @MaciejG604 made their first contribution in #1773
- @xerial made their first contribution in #1777
Full Changelog: v0.1.19...v0.1.20