v0.1.3
New Contributors
- @mtk made their first contribution in #690
- @armanbilge made their first contribution in #732
- @Gedochao made their first contribution in #780
- @wiacekm made their first contribution in #742
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
- Allow users to specify an explicit workspace directory by @alexarchambault in #679
- Package - overwrite a file generated by scala-cli with --watch flag by @lwronski in #714
- Allow use of main.sc scripts with scala-cli by @ghostbuster91 and @mtk in #740
- Pass programArgs to scala repl by @lwronski in #760
- Add server less mode (enable with --server=false) by @alexarchambault in #771
- doctor version diagnosis by @asjad02 in #741
- Emit source maps for package command by @lwronski in #784
- add output option to compile command by @wiacekm in #742
- JsDom - run tests with JSDOM JSEnv by @lwronski in #796
- Package command - add support for multi modules by @lwronski in #816
- Add support for signing in publish command by @alexarchambault in #748
Merged PR
- Prepare to build CLI with Scala 2.13 by @alexarchambault in #689
- Don't let dependencies bump Scala artifacts by @alexarchambault in #693
- Update Mill to 0.10.0 and mill-native-image to 0.1.19 by @alexarchambault in #694
- Fix temporary mill launcher by @alexarchambault in #699
- Tweak Bloop launch-related messages by @alexarchambault in #700
- Fix publish by @alexarchambault in #703
- Setup-ide fails if is call by non-owner by @lwronski in #688
- Use scala-cli-setup in CI by @lwronski in #704
- Update coursier to 2.1.0-M5 by @alexarchambault in #706
- Download scala-cli in build by @alexarchambault in #697
- Open PR with update standalone launcher after release by @lwronski in #705
- Disable using scala-cli to build scala-cli on unsupported architecture by @lwronski in #712
- Use logger in console build bloop client by @lwronski in #713
- Fix scalafix by @alexarchambault in #745
- Tweaking by @alexarchambault in #744
- Add missing Scala Native using directives by @jchyb in #749
- Update Mill to 0.10.1 by @lolgab in #763
- Fix scala-cli-src script by @romanowski in #769
- show update info in About command on linux by @zmerr in #663
- No strict bloop check in build by @alexarchambault in #772
- Add option to debug BSP connection. by @romanowski in #770
- Use jsoniter-scala rather than upickle by @alexarchambault in #777
- Adjust BSP project base directory to scala-cli content root to fix IntelliJ import by @Gedochao in #780
- Use jvm system version if Java Home is higher or equal 17 by @lwronski in #781
- Don't depend on a JDK in the brew formula by @alexarchambault in #787
- Remove now unnecessary Scala-specific GraalVM stuff by @alexarchambault in #785
- Add missing native-image reflection config for BSP wrapped sources by @alexarchambault in #791
- Make BSP build configurations for IDEs be consistent with command line Scala CLI builds by @Gedochao in #794
- Split build into some modules by @romanowski in #795
- Cross-compile with Scala 3 by @alexarchambault in #807
- Move all cli *Options classes to dedicated module by @alexarchambault in #811
- Using directives tests by @romanowski in #822
- Issue 698 doctor command impl by @romanowski in #818
- Show log - Downloading JVM index - only if verbosity is higher than 1 by @lwronski in #824
- Cross compile cli by @romanowski in #826
Documentation changes
- Fix sclicheck by @romanowski in #819
- Update Scala.js guide - package command by @lwronski in #823
- Correction in Scala.js docs by @armanbilge in #821
- Describe how to pass base image by @lwronski inhttps://github.com//pull/765
- Add a cookbook with Scala Native scripting by @jchyb in #750
- Fix deploy decumentation after backport by @lwronski in #766
- Document how to install in GitHub Actions by @armanbilge in #732
- Update scripts.md by @mtk in #690
- Update scala-versions.md by @zmerr in #625
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