v0.1.11
Make .scalafmt.conf
optional when running the fmt
command
Scala CLI can now run the fmt
command without a .scalafmt.conf
file present. Previously, if such a file was absent, a Scalafmt requires explicitly specified version.
error was raised while using the fmt
command.
The Scala CLI fmt
command now supports passing the scalafmt
version and dialect directly from the command line, using the --scalafmt-dialect
and --scalafmt-version
options respectively:
scala-cli fmt --scalafmt-dialect scala3 --scalafmt-version 3.5.8
Either of those (or both) can be skipped, which will make Scala CLI infer a default value.
The configuration used can be saved in the workspace by passing the --save-scalafmt-conf
option.
Define output
option for package
command with using directives
It is now possible to pass the output
option of the package
command with using directives instead of passing it directly from bash.
Add support for running multiple snippets of the same kind
Scala CLI now allows to pass multiple snippets of the same kind.
It was previously possible to mix different kinds (so to pass a Java snippet alongside a Scala one), but not for example 2 separate Scala snippets. That limitation no longer applies.
When passed this way, each snippet is then treated as a separate input by Scala CLI.
$ scala-cli --scala-snippet '@main def main() = println(Messages.hello)' --scala-snippet 'object Messages { def hello = "Hello" }'
Hello
Add bloop sub-command
Scala CLI now has a (hidden for now) bloop sub-command, that runs a command using the Scala CLI Bloop server (while the mainline Bloop bloop CLI uses its default Bloop server). This is handy when debugging things on Scala CLI for example, allowing one to manually run scala-cli bloop projects or scala-cli bloop compile.
Added in #1199 by alexarchambault
Make main class optional in preamble-less assemblies
It is now allowed to generate an assembly, even for code that has no main class, when --preamble=false
is passed. This can be useful for libraries, if users want to pass the assembly to tools such as proguard. This also accepts a (hidden) --main-class-in-manifest=false
option if users want not only no preamble, but also no mention of main class in the assembly manifest (META-INF/MANIFEST.MF
in the assembly JAR). The latter option is useful for tools, such as the hadoop jar command, that behave differently depending on the presence or not of a main class in the manifest.
Added in #1200 by alexarchambault
Important fixes & enhancements
Prevent erroneous using directives from blocking the initial run of BSP
Up till now, running the setup-ide
sub-command on sources containing using directives
with syntax errors or pointing to dependencies which could not be fetched would create a BSP
setup which could not be imported correctly by IDEs. This is no longer the case and such a BSP
connection should now import correctly, so that it's possible to fix the faulty code within the comfort of one's IDE of choice.
This fixes #1097
Work in progress
Allow to globally turn actionable diagnostics on or off
It is now possible to globally enable or disable actionable diagnostics using the config
sub-command.
The relevant configuration is under the actions
key.
$ scala-cli config actions true
Publishing-related features
- Add "publish setup" command by alexarchambault in #926
Other changes
Documentation
- Put the release notes doc on the website by Gedochao in #1196
- Fix typo in Spark docs by alexarchambault in #1183
- Tweak issue templates & the release procedure by Gedochao in #1188
- Add install and uninstall completions documentation by wleczny in #1201
Build and internal changes
- ignore *.semanticdb files by mtk in #1187
- Update scala-cli.sh launcher for 0.1.10 by github-actions in #1185
- Force push updating scala-cli in scala-cli-setup by lwronski in #1189
- Fix running scala check in scala native by lwronski in #1190
- Use manifest JARs in "run" command if needed by alexarchambault in #1198
- Use more lightweight Spark distribs in spark tests by alexarchambault in #1207
- Update GraalVM to 22.2.0 by alexarchambault in #1208
- Split integration tests by alexarchambault in #1202
- Debug macOS CI issue on CI by alexarchambault in #1215
- Update docusaurus to 2.0.0-rc.1 by lwronski in #1224
Updates
- Update core_2.13 to 3.7.0 by scala-steward in #1186
- Update core_2.13 to 3.7.1 by scala-steward in #1194
- Update jsoniter-scala-core_2.13 to 2.13.37 by scala-steward in #1197
- Update jsoniter-scala-core_2.13 to 2.13.38 by scala-steward in #1217
- Update ammonite to 2.5.4-13-1ebd00a6 by scala-steward in #1218
- Update core_2.13 to 3.7.2 by scala-steward in #1219
- Update scala-collection-compat to 2.8.1 by scala-steward in #1221
- Update trees_2.13 to 4.5.11 by scala-steward in #1222
- Update coursier-jvm_2.13, ... to 2.1.0-M6-49-gff26f8e39 by scala-steward in #1223
Full Changelog: v0.1.10...v0.1.11