v0.1.5
The package
command output name now follows the actual main class name
The default output name of the package
command will now follow the actual compiled main class name, while it formerly followed the inferred class name coming from the first source file passed as argument, where applicable.
In other words, for the following 2 sources:
case class SomeCaseClass(value: String)
object Main extends App {
val smth = SomeCaseClass(value = "Hello")
println(smth.value)
}
Running package
without explicit --output
:
scala-cli package SomeCaseClass.scala ActualMainClass.scala
For Scala CLI v0.1.4
and before would the output file name would default to SomeCaseClass
, while as of v0.1.5
it will now fallback to Main
.
If you rely on the package
command without explicitly passing the --output
parameter, the actual output file name may now be different, depending on the passed sources.
Please make sure this does not break any automation in your scripts when upgrading Scala CLI to this version.
This change was added by @Gedochao in #943.
Scala CLI is built using Scala 3
We now rely on Scala 3 (3.1.2
as of this release) as the default internal Scala version used to build the project. We still compile some modules (which were using macros heavily) with Scala 2.13. However, the fact that we can do so shows that migration from Scala 2 to Scala 3 can be done by isolating macros.
This change was added by @romanowski in #913.
Pure Java projects support
Projects consisting only of Java sources are now handled more consistently by Scala CLI. In particular, the Scala library JAR isn't added any more in the class path, and no Scala JARs are downloaded upfront.
This was changed in #940 by @alexarchambault.
Notable PRs
- Fix compute nightly version Scala 2 by @lwronski in #908
- Switch to Scala 3 by default by @romanowski in #913
- Ensure a main class element is findable in Scala code passed by
stdin
by @Gedochao in #933 - Refactor the usage of default main class override to only apply to on-disk Scripts by @Gedochao in #943
- Define valid package type for Scala.js and Scala Native by @lwronski in #941
- Add pure Java projects support by @alexarchambault in #940
Documentation PRs
Other merged PRs
- Update scala-cli.sh launcher for 0.1.4 by @github-actions in #910
- Back port of documentation changes to main by @github-actions in #911
- Update jsoniter-scala-core, ... to 2.13.16 by @scala-steward in #912
- Update cli_2.13, shared_2.13 to 0.1.3 by @scala-steward in #891
- Many minor tweaking / refactoring by @alexarchambault in #917
- Rename module build to build-module to allow run
./mill --repl
by @lwronski in #916 - Add integration tests for BSP workspace/reload by @Gedochao in #914
- Back port of documentation changes to main by @github-actions in #919
- Update jsoniter-scala-core, ... to 2.13.17 by @scala-steward in #927
- Back port of documentation changes to main by @github-actions in #928
- Tweaking by @alexarchambault in #935
- Update jsoniter-scala-core, ... to 2.13.18 by @scala-steward in #939
- Update scalafmt-core to 3.5.2 by @scala-steward in #930
- Update scalafmt-cli to 3.5.2 by @scala-steward in #903
- Update Scala to 3.1.2 by @alexarchambault in #952
- Update publish_2.13 to 0.1.2 by @scala-steward in #950
- Use Constants.defaultScalaVersion instead of properties scala version by @lwronski in #955
- Update GraalVM to 22.1.0 by @alexarchambault in #940
- Remove pretty stacktraces by @lwronski in #954
Contributors
Thank you to all the contributors who made this release possible 🎉
According to git shortlog -sn --no-merges v0.1.4...v0.1.5
these are:
37 Alexandre Archambault
16 Piotr Chabelski
8 Scala Steward
6 Łukasz Wroński
4 github-actions[bot]
1 Krzysztof Romanowski
Full Changelog: v0.1.4...v0.1.5