Releases: VirtusLab/scala-cli
v1.6.1
Pass --repl-init-script
directly to the Scala REPL
Passing an initialization script to the REPL with --repl-init-script
is now allowed directly, rather than after --
or with -O
.
The --repl-init-script
is a REPL option introduced in Scala 3.6.4, so it's not available for earlier Scala versions.
scala-cli repl -S 3.6.4-RC1 --repl-init-script 'println("Hello")'
# Hello
# Welcome to Scala 3.6.4-RC1 (23.0.1, Java OpenJDK 64-Bit Server VM).
# Type in expressions for evaluation. Or try :help.
#
# scala>
Hotfix release
Although Scala CLI 1.6.1 includes a few updates and improvements, it is primarily a hotfix release for version 1.6.0, which due to technical limitations wasn't available on some of our distribution channels.
For extra context refer to:
Features
Internal and build changes
Updates
- Bump Scala CLI launchers to v1.6.0 by @Gedochao in #3450
- chore: Update Bloop to 2.0.8 by @tgodzik in #3449
- Update scalafmt to 3.8.5 by @scala-steward in #3442
Full Changelog: v1.6.0...v1.6.1
v1.6.0
Scala CLI 1.6.0 will not be available on all distribution channels
Due to technical difficulties with our release pipeline, Scala CLI 1.6.0 release distribution channels were limited to:
- its GitHub release page, where launchers for all platforms are available as normal
- Maven Central
- WinGet
- Chocolatey
While it can be used as such, it was followed up with a hotfix 1.6.1 release, which should be available through all standard distribution channels.
Fixed commas being treated as using
directive value separators & deprecated using them with whitespace
NOTE: these are breaking changes affecting using directives syntax.
They're technically fixes + a deprecation, but in a very rare scenario existing builds could break, if they were relying on the erroneous syntax.
This Scala CLI version fixes commas (,
) being treated as using
directive value separators on their own.
Formerly, a directive like:
//> using options -Wunused:locals,privates
Would be (erroneously) interpreted as the following 2 options for the compiler: -Wunused:locals
and privates
.
As a comma will now no longer be treated as a separator (which it never should have been), it will now be interpreted correctly as
a single option: -Wunused:locals,privates
.
Before this change, the only way to pass this value to the options
directive key was escaping the comma with double quotes:
//> using options "-Wunused:locals,privates"
The escaping is no longer necessary.
Additionally, using commas along with whitespace as separators is now deprecated for future removal.
scala-cli compile --scala-snippet '//> using options -Wunused:locals, -Wunused:privates'
# [warn] <snippet>-scala-snippet:1:34
# [warn] Use of commas as separators is deprecated. Only whitespace is neccessary.
# Starting compilation server
# Compiling project (Scala 3.6.3, JVM (23))
# Compiled project (Scala 3.6.3, JVM (23))
Finally, the use of /* (..) */
comments in using
directives is no longer supported.
//> using /* some comment */ options -Wunused:locals /* some other comment */ -Wunused:privates
// this syntax used to be supported, but will now fail.
Added by @Gedochao in #3381 and #3333 and
Cap vague Scala versions at defaults
NOTE: this is a breaking change regarding how the Scala version is resolved.
We have changed how a Scala version is picked when major
or major.minor
prefixes are passed, rather than the full version tag:
-S 3
will now point to the launcher default Scala 3 Next version, rather than whatever is the latest stable version thatcoursier
can find upstream- similarly,
-S 3.<current launcher default minor>
will now point to the launcher default Scala 3 Next version -S 2.13
will point to the launcher default Scala 2.13 version (which up till now only affected tests and generated docs)- similarly,
-S 2.12
will now point to the launcher default Scala 2.12 version - launcher defaults are overridden for a particular Scala series with the
--cli-user-scala-version
to accommodate for Scala CLI installed asscala
For example:
//> using scala 3
// When compiled with Scala CLI v1.6.0, this snippet will use Scala 3.6.3 (the built-in default), even if a newer version has been released.
Support for Scala 3.6.3 and 2.13.16
This Scala CLI version switches the default Scala version to 3.6.3.
scala-cli version
# Scala CLI version: 1.6.0
# Scala version (default): 3.6.3
It has also been tested with Scala 2.13.16.
Added by @Gedochao in #3426 and #3418
Support for Scala.js 1.18.1
This Scala CLI version adds support for Scala.js 1.18.1.
scala-cli -e 'println("Hello")' --js
# Compiling project (Scala 3.6.3, Scala.js 1.18.1)
# Compiled project (Scala 3.6.3, Scala.js 1.18.1)
# Hello
Added in #3440 and VirtusLab/scala-js-cli#113
(⚡️ experimental) scalafix
integration
We now support running scalafix
rules with the fix
sub-command.
scala-cli fix . --power
# The `fix` sub-command is experimental
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# Running built-in rules...
# Writing project.scala
# Removing directives from Smth.scala
# Built-in rules completed.
# Running scalafix rules...
# Starting compilation server
# Compiling project (Scala 3.6.3, JVM (23))
# [warn] ./Main.scala:2:7
# [warn] unused local definition
# [warn] val unused = "unused"
# [warn] ^^^^^^
# Compiled project (Scala 3.6.3, JVM (23))
# scalafix rules completed.
Former fix functionalities are now referred to in the code as the built-in rules.
Effectively, fix now runs 2 separate sets of rules (both enabled by default): built-in and scalafix.
They can be controlled via the --enable-scalafix
and --enable-built-in
command line options.
scalafix
rules are ran according to the configuration in <project-root>/.scalafix.conf
.
It is possible to run external scalafix rules
with the (⚡️ experimental) scalafix.dep
directive:
//> using scalafix.dep com.github.xuwei-k::scalafix-rules:0.6.0
Added by @Vigorge and @dos65 in #2968
Support for running snapshot versions of the build server (Bloop)
It is now possible to pass a snapshot version to the --bloop-version
command line option.
scala-cli compile . --bloop-version 2.0.7-8-fe3f53d9-SNAPSHOT
# Starting compilation server
# Compiling project (Scala 3.6.3, JVM (23))
# Compiled project (Scala 3.6.3, JVM (23))
scala-cli --power bloop about
# bloop v2.0.7-8-fe3f53d9-SNAPSHOT
#
# Using Scala v2.12.20 and Zinc v1.10.7
# Running on Java JDK v23.0.1 (~/Library/Caches/Coursier/arc/https/github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%252B11/OpenJDK23U-jdk_aarch64_mac_hotspot_23.0.1_11.tar.gz/jdk-23.0.1+11/Contents/Home)
# -> Supports debugging user code, Java Debug Interface (JDI) is available.
# Maintained by the Scala Center and the community.
Support for suppressing deprecation warnings
It is now possible to suppress deprecation warnings with the --suppress-deprecated-warnings
command line option.
scala-cli project-with-deprecated-stuff --suppress-deprecated-warnings
You can also suppress deprecation warnings globally by setting the suppress-warning.deprecated-features
configuration key.
scala-cli config suppress-warning.deprecated-features true
Features
- Scalafix command for scala-cli with basic options and tests by @Vigorge and @dos65 in #2968
- Ensure vague Scala versions are capped at defaults by @Gedochao in #3259
- Merge
scalafix
intofix
by @Gedochao in #3400 - Allow to use Bloop snapshot versions by @Gedochao in #3405
- Add ways to suppress deprecation warnings by @Gedochao in #3406
Fixes
- Misc improvements in compiler options handling by @Gedochao in #3253
- Allow shading of single-choice compiler options from the command line regardless of
-
/--
prefix by @Gedochao in #3279 - Fix dependency main class detection throwing an NPE when JAR manifest doesn't list the main class correctly by @Gedochao in #3319
- Fix commas being treated as
using
directives value separators & deprecate using them with whitespace by @Gedochao in #3333 - Retain Bloop connection when restarting a build with
--watch
by @Gedochao in #3351 - Improve deprecation warnings for commas with whitespace used as using directive value separators by @Gedochao in #3366
- Recover from invalid paths returned from Bloop diagnostics by @Gedochao in #3372
- Add missing support for excluding transient dependencies when publishing by @Gedochao in #3357
- Fix using directives crashing on
*/
by removing/* (..) */
comments support inusing_directives
by @Gedochao in #3381 fix
built-in rules: don't wrap directive values in double quotes if not necessary by @Gedochao in ht...
v1.5.4
Hotfix release
Although Scala CLI 1.5.4 includes a few updates and improvements, it is primarily a hotfix release for versions 1.5.2 and 1.5.3, which due to technical limitations weren't available on some of our distribution channels.
Extra context:
The main list of enhancements and fixes is listed in the release notes for 1.5.2.
Support for Scala Native 0.5.6
This Scala CLI version switches the default Scala Native version to 0.5.6.
scala-cli -e 'println("Hello from Scala Native 0.5.6!")' --native
# Compiling project (Scala 3.5.2, Scala Native 0.5.6)
# Compiled project (Scala 3.5.2, Scala Native 0.5.6)
# [info] Linking (multithreadingEnabled=true, disable if not used) (949 ms)
# [info] Discovered 887 classes and 5408 methods after classloading
# [info] Checking intermediate code (quick) (40 ms)
# [info] Multithreading was not explicitly enabled - initial class loading has not detected any usage of system threads. Multithreading support will be disabled to improve performance.
# [info] Linking (multithreadingEnabled=false) (285 ms)
# [info] Discovered 499 classes and 2500 methods after classloading
# [info] Checking intermediate code (quick) (7 ms)
# [info] Discovered 478 classes and 1914 methods after optimization
# [info] Optimizing (debug mode) (429 ms)
# [info] Produced 9 LLVM IR files
# [info] Generating intermediate code (296 ms)
# [info] Compiling to native code (1464 ms)
# [info] Linking with [pthread, dl]
# [info] Linking native code (immix gc, none lto) (208 ms)
# [info] Postprocessing (0 ms)
# [info] Total (3728 ms)
# Hello from Scala Native 0.5.6!
Internal changes
- Pin Fedora docker image at
fedora:40
by @Gedochao in #3283 - Don't fail the
update-packages
andwindows-packages
jobs on individual distributions' steps by @Gedochao in #3288
Documentation changes
- Fix broken example in
//> using dep
reference doc by @Gedochao in #3281 - Mention distribution limitations in the Scala CLI 1.5.3 release notes by @Gedochao in #3286
- Back port of documentation changes to main by @github-actions in #3287
Updates
- Update
mill-native-image
to 0.1.29 by @Gedochao in #3278 - Update expecty to 0.17.0 by @scala-steward in #3277
- Update Bloop to 2.0.5 by @Gedochao in #3276
- Update dependency to 0.2.5 by @scala-steward in #3269
- Update
coursier
to 2.1.17 by @Gedochao in #3275 - Update SBT to 1.10.5 by @Gedochao in #3280
- Update
java-class-name
to 0.1.4 by @Gedochao in #3284 - Update scala-cli.sh launcher for 1.5.3 by @Gedochao in #3285
- Update Scala Native to 0.5.6 by @Gedochao in #3295
- Update Mill to 0.11.13 by @Gedochao in #3296
- Update coursier to 2.1.17 for Linux arm64 builds by @Gedochao in #3298
- Update coursier/dependency to 0.3.1 by @Gedochao in #3297
Full Changelog: v1.5.3...v1.5.4
v1.5.3
This is a hotfix release, which makes all the fixes and enhancements of Scala CLI 1.5.2 available through most standard distribution channels (rather than just Maven Central).
For the main release notes, please refer to the v1.5.2 ones.
Distribution limitations
Due to technical difficulties within our release pipeline, Scala CLI 1.5.3 is not available via the following channels:
yum
(on RedHat/Cent OS/Fedora)SDKMAN!
We will follow up with a 1.5.4 hotfix release to address this issue.
Hot-fixes
- Tag failing native packager tests as flaky by @Gedochao in #3270
- Make publishing depend on all integration tests & docs tests by @Gedochao in #3272
Full Changelog: v1.5.2...v1.5.3
v1.5.2
Scala CLI 1.5.2 will only be available on the JVM
Due to technical difficulties with our release pipeline, Scala CLI 1.5.2 was only released as a JVM launcher on Maven Central. While it can be used as such, we will follow it up with a hotfix 1.5.3 release, which should be available through all standard distribution channels.
scala-cli --cli-version 1.5.2 version
# Scala CLI version: 1.5.2
# Scala version (default): 3.5.2
--source
is now deprecated and scheduled for removal in Scala CLI v1.6.x
Due to how easy it is to confuse --source
(the command line option for producing source JARs with the package
sub-command) and -source
(the Scala compiler option, which can also be passed as --source
in recent Scala 3 versions), using the former is now deprecated, and will likely be removed in Scala CLI v1.6.x.
scala-cli --power package --source .
# [warn] The --source option alias has been deprecated and may be removed in a future version.
# (...)
Do note that the deprecation (and future removal) only affects the option alias.
The feature of packaging source JARs remains unchanged.
It is now recommended to switch to using the --src
alias instead.
scala-cli --power package --src .
Support for Scala 3.5.2
This Scala CLI version switches the default Scala version to 3.5.2.
scala-cli version
# Scala CLI version: 1.5.2
# Scala version (default): 3.5.2
Initial support for emitting Wasm with a command line option and a directive
It is now possible to emit Wasm via Scala.js with the //> using jsEmitWasm
directive:
//> using platform js
//> using jsEmitWasm
//> using jsModuleKind es
//> using jsModuleSplitStyleStr fewestmodules
println("Hello")
Or with the --js-emit-wasm
command line option:
scala-cli --power package wasm.sc --js --js-emit-wasm
# The `--js-emit-wasm` option is experimental
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# Compiling project (Scala 3.5.2, Scala.js 1.17.0)
# Compiled project (Scala 3.5.2, Scala.js 1.17.0)
# Wrote ~/wasm/wasm.js/main.js, run it with
# node ./wasm.js/main.js
tree wasm.js
# wasm.js
# ├── __loader.js
# ├── main.js
# └── main.wasm
#
# 1 directory, 3 files
For more information about Wasm (WebAssembly) support via Scala.js, refer here.
Features
Deprecations
Fixes
- Fix
--watch
to work correctly with changingusing
directives & sources requiring code generation (scripts, markdown, etc) by @Gedochao in #3218 - Ensure resource directories passed via a using directive aren't ignored in
--watch
mode by @Gedochao in #3221 - Ensure consecutive
-Wconf:*
flags are not ignored by @Gedochao in #3245
Documentation changes
- Mention the
Fix
command in theUsing directives
guide by @dabrowski-adam in #3239 - Back port of documentation changes to main by @github-actions in #3242
Updates
- Update scala-cli.sh launcher for 1.5.1 by @github-actions in #3217
- Update sttp to 3.10.0 by @scala-steward in #3219
- Update asm to 9.7.1 by @scala-steward in #3223
- Update bloop-rifle_2.13 to 2.0.3 by @scala-steward in #3225
- Update bloop-config_2.13 to 2.1.0 by @scala-steward in #3228
- chore: Update next to 3.5.2-RC2 by @tgodzik in #3224
- Update
coursier
to 2.1.14 by @scala-steward in #3226 - Update core_2.13 to 3.10.1 by @scala-steward in #3229
- Update
os-lib
to 0.11.2 by @Gedochao in #3232 - Update sbt, scripted-plugin to 1.10.3 by @scala-steward in #3235
- Update dependency to 0.2.4 by @scala-steward in #3234
- Bump Scala Next to 3.5.2 by @Gedochao in #3230
- Update os-lib to 0.11.3 by @scala-steward in #3240
- Set Scala 3.5.2 as the latest announced Scala Next version by @Gedochao in #3243
- Set Scala 3.6.1 as the Next RC version (which it effectively is) by @Gedochao in #3244
- Update dependencies in
gh-action.md
examples by @kubukoz in #3249 - Bump
scala-js-cli
to 1.17.0.1 by @Gedochao in #3252
New Contributors
- @dabrowski-adam made their first contribution in #3239
Full Changelog: v1.5.1...v1.5.2
Latest launchers
Merge pull request #3257 from Gedochao/maintenance/deprecate-source Deprecate the `--source` command line option for the `package` sub-command
v1.5.1
Support for Scala 3.5.1, 3.3.4, 2.13.15 and 2.12.20
This Scala CLI version switches the default Scala version to 3.5.1.
scala-cli version
# Scala CLI version: 1.5.1
# Scala version (default): 3.5.1
It has also been tested with Scala 3.3.4, 2.13.15 and 2.12.20.
The Scala CLI internals are now built with Scala 3.3.4.
Support for Scala.js 1.17.0
This version adds Scala CLI support for Scala.js 1.17.0.
Features
Fixes
- improvement: Use distinct on ScalacOpt by @tgodzik in #3139
- bugfix: Check if last segment of path exists by @tgodzik in #3131
- bugfix: Fix duplicate options detection by @tgodzik in #3151
- bugfix: Also deduplicate if options split by space by @tgodzik in #3154
- Fix
setup-ide
for--cli-version
by @Gedochao in #3161 - Ensure main classes from inputs take precedence before those found in JARs added to the class path by @Gedochao in #3165
- Ensure that passing Java props into Scala CLI as launcher args would also pass it into BSP configuration by @Gedochao in #3169
- NIT fixes for the
export
sub-command by @Gedochao in #3197 - Ensure
--version
passed to the default command works with--offline
by @Gedochao in #3207
Documentation changes
- Docs: Fix suppress option for directives-in-multiple-files warning by @mims-github in #3133
- Doc: Tips on how to list available JVMs using coursier by @jatcwang in #3129
- Back port of documentation changes to main by @github-actions in #3160
- Use Scala 3 in the Scala Native gif by @Gedochao in #3195
Build and internal changes
- Add tests for
setup-ide
with--cli-version
by @Gedochao in #3163 - Change how help is referenced to avoid initialization oddness & update
case-app
to 2.1.0-M29 by @coreyoconnor in #3152 - Adjust tests for Scala 3.3.4 by @Gedochao in #3164
- NIT Refactor existing
--watch
tests by @Gedochao in #3175 - Generate an empty JUnit report when no tests were run, rather than fail by @Gedochao in #3179
- NIT Extract REPL tests relying on Ammonite into dedicated traits by @Gedochao in #3209
Updates
- Update scala-cli.sh launcher for 1.5.0 by @github-actions in #3125
- Bump webpack from 5.89.0 to 5.94.0 in /website by @dependabot in #3136
- Bump micromatch from 4.0.5 to 4.0.8 in /website by @dependabot in #3135
- Update os-lib to 0.10.5 by @scala-steward in #3140
- Update Scala Next latest announced version to 3.5.0 by @Gedochao in #3145
- Update Scala 2.12 to 2.12.20 by @Gedochao in #3144
- Update Scala CLI as
scala
related docs by @Gedochao in #3155 - Update os-lib to 0.10.6 by @scala-steward in #3159
- Update coursier to 2.1.11 by @scala-steward in #3166
- Update coursier to 2.1.12 by @scala-steward in #3174
- Update ammonite to 3.0.0-M2-30-486378af by @scala-steward in #3172
- Update sbt to 1.10.2 by @scala-steward in #3180
- Update munit to 1.0.2 by @scala-steward in #3176
- Bump
scala-cli-signing
to 0.2.4 by @Gedochao in #3183 - Bump
coursier
to 2.1.13 andmill-native-image
to 0.1.26 by @Gedochao in #3182 - Update Scala Next to 3.5.1 by @Gedochao in #3190
- Update Scala 3 Next RC to 3.5.2-RC1 by @scala-steward in #3187
- Update Scala 2.13 to 2.13.15 by @Gedochao in #3201
- Update guava to 33.3.1-jre by @scala-steward in #3203
- chore: Update Bloop to 2.0.2 by @tgodzik in #3192
- Update Scala 3 LTS to 3.3.4 by @Gedochao in #3208
- Set Scala 3.5.1 as the latest announced version by @Gedochao in #3206
New Contributors
- @mims-github made their first contribution in #3133
- @jatcwang made their first contribution in #3129
- @coreyoconnor made their first contribution in #3152
Full Changelog: v1.5.0...v1.5.1
v1.5.0
Support for Scala 3.5.0
This Scala CLI version switches the default Scala version to 3.5.0.
scala-cli version
# Scala CLI version: 1.5.0
# Scala version (default): 3.5.0
Support for Scala Native 0.5.5
This Scala CLI version switches the default Scala Native version to 0.5.5.
scala-cli -e 'println("Hello from Scala Native 0.5.5!")' --native
# Compiling project (Scala 3.5.0, Scala Native 0.5.5)
# Compiled project (Scala 3.5.0, Scala Native 0.5.5)
# [info] Linking (multithreadingEnabled=true, disable if not used) (894 ms)
# [info] Discovered 888 classes and 5407 methods after classloading
# [info] Checking intermediate code (quick) (31 ms)
# [info] Multithreading was not explicitly enabled - initial class loading has not detected any usage of system threads. Multithreading support will be disabled to improve performance.
# [info] Linking (multithreadingEnabled=false) (299 ms)
# [info] Discovered 499 classes and 2497 methods after classloading
# [info] Checking intermediate code (quick) (5 ms)
# [info] Discovered 478 classes and 1912 methods after optimization
# [info] Optimizing (debug mode) (403 ms)
# [info] Produced 9 LLVM IR files
# [info] Generating intermediate code (368 ms)
# [info] Compiling to native code (1565 ms)
# [info] Linking with [pthread, dl]
# [info] Linking native code (immix gc, none lto) (83 ms)
# [info] Postprocessing (0 ms)
# [info] Total (3625 ms)
# Hello from Scala Native 0.5.5!
(⚡️ experimental) Support for exporting to a Maven project
It is now possible to export a Scala CLI project to Maven.
scala-cli export --script-snippet 'println("No need to create the pom.xml yourself!")' --mvn --power -o mvn-demo
# Some utilized features are marked as experimental:
# - `export` sub-command
# - `--mvn` option
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# Exporting to a maven project...
# Exported to: ~/scala-cli-tests/mvn-demo
cd mvn-demo
mvn scala:run -DmainClass=snippet_sc
# (...)
# No need to create the pom.xml yourself!
# [INFO] ------------------------------------------------------------------------
# [INFO] BUILD SUCCESS
# [INFO] ------------------------------------------------------------------------
# [INFO] Total time: 2.589 s
# [INFO] Finished at: 2024-08-22T12:08:36+02:00
# [INFO] ------------------------------------------------------------------------
Added by @yadavan88 in #3003.
Support for launching apps from dependencies without other inputs
It is now possible to launch an app by just specifying its dependency, without the need to provide any source files.
In such a case the build server will not be started, as there's no compilation to be done.
There's also no need to specify the main class, as it's now being detected automatically in dependencies as well.
Do note that explicitly calling the run
sub-command is necessary here, as otherwise Scala CLI will default to the REPL.
scala-cli run --dep io.get-coursier:coursier-cli_2.13:2.1.10 -- version
# 2.1.10
This can be used similarly to Coursier's cs launch
.
Added by @kasiaMarek in #3079.
(⚡️ experimental) JMH available in various commands and via using
directives
Some improvements have been done to the experimental support for JMH (Java Microbenchmark Harness).
The --jmh
and --jmh-version
options can now be passed to a number of commands:
run
, as it was before (note that when--jmh
is passed torun
, the project's main class will default to running the benchmarks rather than the project's default main method; this behaviour is likely to be changed in future versions).compile
, so that a Scala CLI project with benchmarking can be compiled separately from being run;package
, although the resulting artifacts will run the project as normal for now, rather than benchmarks;setup-ide
, so that benchmarking projects can be imported to your IDE of choice;test
andexport
will now also no longer fail with--jmh
, although no specific implementations for benchmarking are in place there yet.
It is now also possible to control JMH with using
directives:
//> using jmh
allows to enable JMH for the project, being the equivalent of the--jmh
option.//> using jmhVersion <version>
allows to set the JMH version to use, being the equivalent of the--jmh-version
option.
//> using jmh
//> using jmhVersion 1.37
package bench
import org.openjdk.jmh.annotations.*
import java.util.concurrent.TimeUnit
@BenchmarkMode(Array(Mode.AverageTime))
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Warmup(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 10, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(0)
class Benchmarks {
@Benchmark
def foo(): Unit = {
(1L to 1000L).sum
}
}
Expect more improvements in this area in the future.
Also, do play with it and give us feedback about the current implementation!
Added by @Gedochao in #3091 and #3118.
Support for auto-completions in fish
We now have command line auto-completions for the fish
shell.
Added by @KristianLentino99 in #3104.
--js-es-module-import-map
no longer requires --power
mode
A bit of a minor thing, but you can now use the --js-es-module-import-map
option without enabling --power
mode.
Features
- Add support for exporting to a Maven project by @yadavan88 in #3003
- improvement: allow to run main class from deps with no inputs by @kasiaMarek in #3079
- Promote
--js-es-module-import-map
to stable by @Gedochao in #3086 - Tweak benchmarking with JMH by @Gedochao in #3091
- Add support for fish auto-completions by @KristianLentino99 in #3104
- Add directives for JMH by @Gedochao in #3118
Fixes
- bugfix: Exclude sourcecode dependency by @tgodzik in #3094
- bugfix: Exclude both sourcecode and collection-compat correctly by @tgodzik in #3105
- Make package command handle directories in extra classpath by @joan38 in #3096
- Add extra try-catch clause + extra logging in
LocalRepo
by @Gedochao in #3114 - Fix/changing options from sources should not require reload by @MaciejG604 in #3112
- fix: remove the --release flag by @kasiaMarek in #3119
- Remove adding test options to the project/build target name hash by @MaciejG604 in #3107
Internal changes
- Make the
publish
CI job depend onjvm-tests-5
(Scala 3 Next RC test suite) by @Gedochao in #3078 - Include scanning the
.exe
launcher in the release procedure by @Gedochao in #3081 - refactor: Switch to original fork of Bloop by @tgodzik in #3020
- Extract used Java versions to constants by @Gedochao in #3087
- NIT Extract bsp testing utils to a helper trait by @Gedochao in #3092
- Fix/simplify code by @MaciejG604 in #3106
Documentation changes
Updates
- Update scala-cli.sh launcher for 1.4.3 by @github-actions in #3073
- Update bloop-config_2.13 to 2.0.3 by @scala-steward in #3072
- Update Scala toolkit to 0.5.0 by @Gedochao in #3076
- Update Typelevel toolkit to 0.1.27 by @Gedochao in #3077
- Update Scala 3 Next RC to 3.5.0-RC7 by @Gedochao in #3080
- Update bloop-rifle_2.13 to 2.0.0 by @scala-steward in #3108
- Update munit to 1.0.1 by @scala-steward in #3100
- Update Scala 3 Next to 3.5.0 by @Gedochao in #3093
- Update sttp to 3.9.8 by @scala-steward in #3098
- Update guava to 33.3.0-jre by @scala-steward in #3113
- Update slf4j-nop to 2.0.16 by @scala-steward in #3101
- Update Scala 3 Next RC to 3.5.1-RC2 by @scala-steward in #3099
- Update Scala Native to 0.5.5 by @Gedochao in #3117
- Update os-lib to 0.10.4 by @scala-steward in #3121
- Update mill-main to 0.11.12 by @scala-steward in https://git...
v1.4.3
This release is a hotfix for 1.4.2, which due to technical difficulties was not released to Maven Central (and, as an extension, wasn't available as a JAR).
All changes introduced by v1.4.2 are included in this release.
Internal changes
- Ensure the
publish
step to be necessary for updating the native packages upon release by @Gedochao in #3067
Updates
- Update mill-main to 0.11.10 by @scala-steward in #3060
- Update mill-main to 0.11.11 by @Gedochao in #3068
Full Changelog: v1.4.2...v1.4.3
v1.4.2
Environment variable help with --env-help
You can now list environment variables used internally with the --envs-help
flag.
This does include some environment variable used by Scala CLI's dependencies (like Coursier, Bloop, etc.), but should not be treated as an exhaustive list.
scala-cli --env-help --power
# The following is the list of environment variables used and recognized by Scala CLI.
# It should by no means be treated as an exhaustive list.
# Some tools and libraries Scala CLI integrates with may have their own, which may or may not be listed here.
#
# Scala CLI
# SCALA_CLI_CONFIG Scala CLI configuration file path
# SCALA_CLI_HOME Scala CLI home directory
# SCALA_CLI_INTERACTIVE Interactive mode toggle
# SCALA_CLI_INTERACTIVE_INPUTS Interactive mode inputs
# SCALA_CLI_POWER Power mode toggle
# SCALA_CLI_PRINT_STACK_TRACES Print stack traces toggle
# SCALA_CLI_SODIUM_JNI_ALLOW Allow to load libsodiumjni
# SCALA_CLI_VENDORED_ZIS Toggle io.github.scala_cli.zip.ZipInputStream
#
# Java
# JAVA_HOME Java installation directory
# JAVA_OPTS Java options
# JDK_JAVA_OPTIONS JDK Java options
#
# Coursier
# COURSIER_CACHE Coursier cache location
# COURSIER_MODE Coursier mode (can be set to 'offline')
#
# Spark
# SPARK_HOME (power) Spark installation directory
#
# Miscellaneous
# PATH The app path variable
# DYLD_LIBRARY_PATH Runtime library paths on Mac OS X
# LD_LIBRARY_PATH Runtime library paths on Linux
# PATHEXT Executable file extensions on Windows
# SHELL The currently used shell
# VCVARSALL Visual C++ Redistributable Runtimes
# ZDOTDIR Zsh configuration directory
#
# Internal
# CI (power) Marker for running on the CI
Features
- Add environment variable help under
--envs-help
& refactor environment variable usage by @Gedochao in #3055
Fixes
- Fix default scaladoc config, so that id doesn't break all scaladoc links by @KacperFKorban in #3041
- Fix the REPL crashing when a dependency's classpath is called by a macro by @Gedochao in #3043
- Fix Mill export for projects with just the test scope by @Gedochao in #3046
- Ensure
--cli-default-scala-version
is respected by--scalac-help
by @Gedochao in #3048 - Fix
generate-linux-arm64-native-launcher
by @Gedochao in #3053
Internal changes
- Prevent some flaky tests from failing on the CI by @Gedochao in #3049
- Switch to GitHub M1/
aarch64
runners on the CI by @Gedochao in #3050 - Fix Scala 2 nightly test failures by tagging them as flaky or skipping by @Gedochao in #3064
Updates
- Update scala-cli.sh launcher for 1.4.1 by @github-actions in #3039
- Update ammonite to 3.0.0-M2-15-9bed9700 by @scala-steward in #3059
- Update metaconfig-typesafe-config to 0.13.0 by @scala-steward in #3058
- Update semanticdb-shared_2.13.14 to 4.9.9 by @scala-steward in #3063
- Update scalafmt-cli_2.13, scalafmt-core to 3.8.3 by @scala-steward in #3062
- Update os-lib to 0.10.3 by @scala-steward in #3061
Full Changelog: v1.4.1...v1.4.2