Skip to content

v0.1.5

Compare
Choose a tag to compare
@Gedochao Gedochao released this 04 May 09:57
· 2488 commits to main since this release
a86dd28

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

  • Add more details in the release procedure docs by @Gedochao in #920

Other merged PRs

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