Skip to content

v0.1.8

Compare
Choose a tag to compare
@Gedochao Gedochao released this 14 Jun 11:57
· 2820 commits to main since this release
05de912

--list-main-classes option for the run command

You can pass the option --list-main-classes to the run command to list all the available main classes, including
scripts.

$ scala-cli . --list-main-classes
Hello scripts.AnotherScript_sc scripts.Script_sc

Added in #1095 by @Gedochao

Add config command

The config sub-command allows to get and set various configuration values, intended for use by
other Scala CLI sub-commands.

This feature has been added in preparation for the publish command, stay tuned for future announcements.

Added in #1056 by @alexarchambault

Prioritise non-script main classes

When trying to run a directory containing scripts and just a single non-script main class, the non-script main class
will now be prioritised and run by default.

$ scala-cli .
Running Hello. Also detected script main classes: scripts.AnotherScript_sc, scripts.Script_sc
You can run any one of them by passing option --main-class, i.e. --main-class scripts.AnotherScript_sc
All available main classes can always be listed by passing option --list-main-classes
Hello world

Changed in #1095 by @Gedochao

Important bugfixes

Accept latest Scala versions despite stale Scala version listings in cache

Scala CLI uses version listings from Maven Central to check if a Scala version is valid. When new Scala versions are
released, users could sometimes have stale version listings in their Coursier cache for a short period of time (the
Coursier cache TTL, which is 24 hours by default). This prevented these users to use new Scala versions during that
time.
To work around that, Scala CLI now tries to re-download version listings when they don't have the requested Scala
version.
This addresses #1090

Fixed in #1096 by @lwronski

Bloop now uses JAVA_HOME by default

Bloop should now pick up the JDK available in JAVA_HOME. It was formerly necessary to pass --bloop-jvm system
explicitly. This addresses #1102

Fixed in #1084 by @lwronski

The -coverage-out option now accepts relative paths

Scala CLI now correctly processes relative paths when passed to the -coverage-out option. Formerly,
the scoverage.coverage file would not be properly generated when a relative path was passed.
This addresses #1072

Fixed in #1080 by @lwronski

Other changes

Documentation PRs

Fixes

  • Add suffix to project name which contains virtual files by @lwronski
    in #1070

Build and internal changes

Full Changelog: v0.1.7...v0.1.8