Scala 3.9.0 release thread

Scala 3.9.0-RC6 is now available for testing

5 Likes

I haven’t found any errors this time around!

It is annoying that - 25 and -25.toString are indistinguishable by message (unless -explain is on). The former is always syntactically dubious–possibly a typo but also likely an error. The latter is a safety for people who don’t think number literals are primary and tokenizing and operator precedence is secondary (i.e. a heads up for people who have been programming too long to retain the natural naive interpretation that 25 and -25 are just numbers and behave the same, but not long enough to know that for Scala 25 and -25 do in fact behave the same syntactically).

I assume the message can be tweaked for 3.9.1 or later in a way that allows -Wconf to discriminate between them, so it need not be bikeshedded now.

I missed the distinction (brain not fully engaged) but probably there will be further opportunity to refine the message when they fix Character Literals:

scala> -42.toString
1 warning found
-- [E028] Syntax Warning: ------------------------------------------------------
1 |-42.toString
  |^
  |Illegal literal
  |-----------------------------------------------------------------------------
  | Explanation (enabled by `-explain`)
  |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  | Available literals can be divided into several groups:
  |  - Integer literals: 0, 21, 0xFFFFFFFF, -42L
  |  - Floating Point Literals: 0.0, 1e30f, 3.14159f, 1.0e-100, .1
  |  - Boolean Literals: true, false
  |  - Character Literals: 'a', 'A', '
  | '
  |  - String Literals: "Hello, World!"
  |  - null
   -----------------------------------------------------------------------------
val res0: String = "-42"

which was intended more literally:

| - Character Literals: 'a', '\u0041', '\n'

The fix to warn for -42L.abs is not on 3.9 LTS.

It occurred to me to wonder if -rewrite works:

scala> -42.toString
1 warning found
[patched file <incomplete-handler>]
[patched file rs$line$1]
-- [E028] Syntax Warning: ------------------------------------------------------
1 |-42.toString
  |^
  |Illegal literal
  |
  | longer explanation available when compiling with `-explain`
val res0: String = "-42"

The riddl project compiles with 3.9.0-RC6 in 96 seconds, with errors and no modifications needed since 3.9.0-RC4.

FYI: RIDDL is ~137,400 lines of Scala across 609 files that build for JVM, JS, and Native platforms. Of those lines, 97,783 of them are non-blank, non-comment code lines. There are 43,315 lines of non-blank, non-comment “main” code and 54,403 non-blank, non-comment “test” code.

How much good news do I have to share before you folks decide to push the button and release 3.9.0? :slight_smile: My 2.0.0 release of RIDDL is now waiting on it.

2 Likes

It’s there! I’m already using it.

1 Like

Yes, 3.9.0 is now on Maven Central :tada:

I must issue the usual disclaimers, though:

  • Publishing of JARs is not the final step in the release process
  • It’s still possible for some showstopper to be found that would cause the release to be withdrawn
  • Full release notes are still being written
  • Tooling is still being built, tested, and published

We ask that people not jump the gun and announce the release themselves on Reddit, X, et al. Please wait for the official announcement on the Scala blog.

Regardless, enjoy playing with it…!

15 Likes

Apparently, timing is everything!

Thanks for all the hard work getting this LTS out the door. It is much appreciated!

4 Likes

Scala 3.9 is now officially released! See the blogpost for summary of changes and migration guide

14 Likes

Congrats on the release :tada: Thanks a lot for all the had work, including the blog post and detailed release notes ! Really looking forward to seeing the evolution of an already great language after this milestone

And nice little touch putting it out on the 03/09 :wink:

4 Likes