Skip to content

v0.1.3

Compare
Choose a tag to compare
@lwronski lwronski released this 04 Apr 12:34
· 2642 commits to main since this release
d469bc1

New Contributors

Thank you!

Scala CLI can run nightly versions of Scala 2.12, 2.13 and 3.x

Since 0.1.3 it is possible to use the latest nightly version of Scala compiler with the syntax 2.12.nightly, 2.13.nightly and 3.x.nightly.

For compiling with the latest Scala 2.12 nightly build:

scala-cli Hello.scala -S 2.12.nightly

For compiling with the latest specific binary version of Scala 3 nightly build:

scala-cli Hello.scala -S 3.1.nightly
scala-cli Hello.scala -S 3.0.nightly

This feature was added by @zmerr in #736 and #788

Revolver mode

--revolver mode runs your application in the background and automatically restarts it upon any change:

 scala-cli run Hello.scala --revolver
 # Hello
 # Watching sources, press Ctrl+C to exit.
 # Compiling project (Scala 3.1.1, JVM)
 # Compiled project (Scala 3.1.1, JVM)
 # Hello World
 # Watching sources, press Ctrl+C to exit.

This feature was added by @lwronski in #747

Support Scala.js linking on Windows

Scala CLI now supports Scala.js linking on Windows, so it allows to build and run Node.js applications on this OS (changed in #676).

Native image packaging

Passing --native-image to the package sub-command generates native executables applications using GraalVM native images. This feature may not work with Scala 3 but Scala CLI team is working to fix it soon (changed in #773).

scala-cli package Hello.scala -o hello --native-image

Build Scala CLI with Scala 2.13

From now on Scala CLI is built with Scala 2.13. It is a first step in order to migrate to Scala 3, stay tuned (changed in #649).

Scaladoc packaging

Passing --doc to the package sub-command generates a scaladoc JARs. These follow the same format as the scaladoc JARs of libraries published to Maven Central. This is another step for adding support for a publish command, which should be announced in the next release (this feature was added in #774).

scala-cli package Hello.scala -o hello --doc

Experimental

New publish command

publish command was added to Scala CLI, but it is still until development and requires some additional testing. Publishing your library will be easier than before, so stay tuned to official announcement this feature (this feature was added in #707).

Proxy auth mechanism

Authenticated proxies can now be configured in Scala CLI. Note that this feature should also work in the Scala CLI native launchers, which is an improvement over how it works in the coursier CLI (there, it works for coursier run from the JVM, not with the coursier native launchers).

To setup authenticated proxy credentials, we recommend setting 8 Java properties, like

$ scala-cli \
  -Dhttp.proxyHost=my-proxy.com -Dhttp..proxyPort=8888 -Dhttp.proxyUser=johndoe -Dhttp.proxyPassword=1234 \
  -Dhttps.proxyHost=my-proxy.com -Dhttps..proxyPort=8888 -Dhttps.proxyUser=johndoe -Dhttps.proxyPassword=1234

(You should change the property values to the ones of your proxy.)

The way these proxies are configured is a bit cumbersome, and is likely to change in the near future.

(changed in #768)

Notable changes

Merged PR

Documentation changes

Contributors

Thank you to all the contributors who made this release possible 🎉

According to git shortlog -sn --no-merges v0.1.2...v0.1.3 these are:

    92  Alexandre Archambault
    39  Krzysztof Romanowski
    19  Łukasz Wroński
     7  Piotr Chabelski
     4  zmerr
     4  Mark T. Kennedy
     3  dependabot[bot]
     2  Arman Bilge
     2  Jan Chyb
     2  asjad02
     1  Michał Wiącek
     1  Lorenzo Gabriele
     1  Kasper Kondzielski

Full Changelog: v0.1.2...v0.1.3