Skip to content

v1.5.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@Gedochao Gedochao released this 12 Nov 06:35
· 70 commits to main since this release
8c13bf6

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 .  

Added by @Gedochao in #3257.

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

Added by @Gedochao in #3230

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.

Added by @Quafadas in #3255.

Features

  • Add a --js-emit-wasm option and a corresponding using directive by @Quafadas in #3255

Deprecations

  • Deprecate the --source command line option for the package sub-command by @Gedochao in #3257

Fixes

  • Fix --watch to work correctly with changing using 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 the Using directives guide by @dabrowski-adam in #3239
  • Back port of documentation changes to main by @github-actions in #3242

Updates

New Contributors

Full Changelog: v1.5.1...v1.5.2