v0.1.2
This release focuses on stability.
The last release of Scala CLI 0.1.1
introduced some regressions and we have decided not to announce it. This release notes is composed of both 0.1.1
and 0.1.2
releases.
New Contributors
- @zmerr become a member of the core team
- @Quafadas made their first contribution in #595
- @ghostbuster91 made their first contribution in #639
Thank you!
Scala CLI now uses Java 17
From now, Scala CLI uses by default Java 17 to compile and run your scala code (changed by in #669)
Redesign Compile command
Until now, Scala CLI compiles the main and test scope if you run the following commands: run
, package
, compile
and repl
.
Since 0.1.2
the compile
command is compiling only the main scope by default. If you want to compile also test scope, you should pass --test
flag to compile
command:
scala-cli compile --test [args]
package
,repl
and run
commands by default compile only the main scope. This change was introduced in #638 by @lwronski.
Scala CLI can run nightly versions of Scala 2 and 3
Since 0.1.2
it is possible to use the latest nightly version of Scala compiler with the syntax 2.nightly
and 3.nightly
.
For compiling with the latest Scala 2 nightly build:
scala-cli Hello.scala -S 2.nightly
For compiling with the latest Scala 3 nightly build:
scala-cli Hello.scala -S 3.nightly
For compiling with a specific nightly build for Scala 2, you have to pass the full version:
scala-cli Hello.scala -S 2.13.9-bin-4505094
It is also possible to use this syntax in using directives:
//> using scala "2.nightly"
This feature was added by @zmerr in #677.
Override using directives options
This release adds support to override scalac
, java
, and dependency
options of using directives with CLI counterparts. Only specific values (a given dependency or java or scala option) are overridden, and the rest of the options are concatenated. In the following example:
$ cat Hello.scala
//> using lib "org.scalameta::munit::1.0.0-M1"
//> using lib "com.lihaoyi::os-lib:0.8.1"
$ scala-cli Hello.scala --dependency "org.scalameta::munit::0.7.29" --dependency "io.spray::spray-http:1.3.4"
Scala CLI uses version 1.0.0-M1
of munit
, along with os-lib
and spray-http
.
This feature allows overriding (downgrade) a value/dependency without modifying the source file (or when used with e.g. gists)
Suport for SDK
Scala CLI will be available on SDKMAN. From now, Scala CLI generates packages that are supported by SDKMAN.
This change was introduced in #609 .
Experimental support for using directives in Java files
in #639, @ghostbuster91 has implemented initial support for placing using directives within .java
files as a part of Scala 3 issue spree framework with help from @mtk and @romanowski. The feature is still experimental and actual directives that will be supported and other details are subject to change in upcoming releases.
Notable changes
- Prepare to build CLI with Scala 2.13 by @alexarchambault in #665
- Automate releases to SDKMAN by @lwronski #657
- Fix formatting in Scala CLI on Windows command prompt by @alexarchambault in #675
- Stop reading global bloop config by @lwronski in #672
- Provide proper logger for using directives plus Tweaking by @alexarchambault in #618
- Generate only one build target for main and test scope by @lwronski in #550
- Fix #588: fmt --check not being passed to scalafmt by @jchyb in #600
- Fix project import in Intellij. Support for Intellij still depends on project structure and in many cases may not work regardless of this fix by @romanowski in #608
- Allow users to specify an explicit workspace directory by @alexarchambault in #679
Merged PR
- Fix - define multiple times scalac options with -P and Xplugin prefix by @lwronski in #653
- Allow to disable Bloop file content comparison by @alexarchambault in #666
- Skip set posix file permissions in windows by @lwronski in #671
- Don't compute "hash data" for options that are not used by Bloop by @alexarchambault in #648
- Fix Scala Native directory project caching by @jchyb in #641
- Better Scala.JS and Scala Native logging during tests by @alexarchambault in #668
- More lightweight coursier logging by @alexarchambault in #667
- Passes a logger taking into account verbosity to the Scala.JS linker by @alexarchambault in #673
- Fix generate help for shebang by @lwronski in #616
- Prepare build to windows-2022 GitHub action image by @alexarchambault in #585
- Use HttpURLConnection to download files by @lwronski in #590
- Add docker-based sudo test by @alexarchambault in #605
- Lock millw script commit in export command by @alexarchambault in #628
- Renaming default branch to main by @lwronski in #630
Documentation changes
- made demo.gif show a simple scripting sample first by @zmerr in #658
- Release procedure by @lwronski in #587
- Minor documentation editorial changes by @Quafadas in #595
Contributors
Thank you to all the contributors who made this release possible 🎉
According to git shortlog -sn --no-merges v0.1.0...v0.1.2
these are:
37 Alexandre Archambault
25 zmerr
16 Łukasz Wroński
9 Krzysztof Romanowski
5 ghostbuster91
4 Jan Chyb
1 Simon Parten
1 Kasper Kondzielski
Full Changelog: v0.1.0...v0.1.2