Scala 3.7.0-RC1 is now ready for tests!
The release now enters testing period, the final 3.7.0 release would happen no earlier then April 22.
We are aware of few regressions not yet fixed before 3.7.0-RC1 cutoff as well other issues discovered after 3.7.0-RC1 release:
Running tests with munit
and Scala.js breaks for Scala 3.7 #22794
You can expect a followup release candidates in the upcoming weeks with these issues resolved
Highlights of the release
Add @scala.annotation.internal.preview
annotation and -preview
flag. #22317
Make SIP-52 @publicInBinary
a stable feature in 3.7 #22591
Make SIP-58 - Named Tuples
a stable feature in 3.7 #22753
Make SIP-62 - Better Fors
a preview feature in 3.7 #22776
Implement SIP-61 @unroll
annotation as experimental #21693
Implement SIP-68 Reference-able Package Objects
as experimental #22011
Upgrade Scala 2 Standard Library to 2.13.16 #22386
Upgrade Scala.js to 1.18.1. #22397
Upgrade Scala CLI to 1.7.0 #22735
Expression Compiler is now part of Scala 3 compiler #22597
Quotes API: Added apply
methods to import selectors #22457
Quotes API: Implement experimental summonIgnoring
method #22417
Quotes API: Add class parameters, flags, and privateWithin and annotations to experimental newClass
methods #21880
Experimental: Capture Calculus - Inferring tracked
modifier #21628
Presentation Compiler: Show inferred type on holes in hover #21423
JVM Backend: Fix #15736 blocking Scala 3 on Android #22632
REPL: add flag to quit after evaluating init script #22636
REPL: implement :jar (deprecate :require) #22343
Linting: Improvements to -Wunused and -Wconf #20894
Implicit parameters warn at call site without using
keyword #22441
Minimal support for dependent case classes #21698
11 Likes
Yes, it’s included in 3.7.0-RC1, not sure why it was skipped in the release notes scripts though. I’ll update the notes to include it as it’s a new experimental feature
Scala 3.7.0-RC2 is now ready for tests
5 Likes
3.7.0-RC3 is out
This version fixes one bug related to Named Tuples
Stable release is planned for first week of May
5 Likes
Just wanted to post here that we tried out 3.7.0-RC1 in Mill and all CI was passing (Upgrade to Scala 3.7.0-RC1 by lihaoyi · Pull Request #4745 · com-lihaoyi/mill · GitHub ), so looks good on our end
2 Likes
We’ve also released 3.7.0-RC4 with the the upgrade to Scala.js 1.19.0, which would otherwise need to wait until 3.8. There shouldn’t be any new issues related to that, but we’ll run the community build to make sure.
2 Likes
Also important to note is the Scala native plugin released is delayed until next week.
1 Like
Just a feedback on 3.7.0-RC4: “-rewrite -source 3.7-migration” generates invalid code that cannot be compiled. Details are in #23023 .
1 Like
thanh
May 6, 2025, 11:38am
10
It seems 3.7.0 has some false positive unused warning, here is one that I can reproduce:
//> using scala 3.7.0
//> using options -Wunused:all
import scala.util.NotGiven
case class ByColor[A](white: A, black: A)
object ByColor:
def apply[A](f: Int => A)(using NotGiven[f.type <:< PartialFunction[Int, A]]): ByColor[A] =
new ByColor(f(0), f(1))
with warning:
[warn] ./unused-warning.scala:9:35
[warn] unused implicit parameter
[warn] def apply[A](f: Int => A)(using NotGiven[f.type <:< PartialFunction[Int, A]]): ByColor[A] =
[warn]
This is one of use case that We use implicit just to provide an evidence, but don’t actually use it. Either to prevent some faulty behavior or for performance reason.
Thank you for the report. This regression seems to be fixed in the nightly versions and 3.7.1-RC1 which is going to be announced tomorrow.
2 Likes
thanh
May 6, 2025, 12:18pm
12
thanks, 3.nightly
indeed fixed the issue. Let my see if I can reproduce other false positive
1 Like
thanh
May 6, 2025, 7:29pm
13
found a bug when migrating lila to 3.7.0: faulty rewrite implicit parameter with using clause · Issue #23112 · scala/scala3 · GitHub
the full migration was okayish, the compiler crashes for few times, incremental compiler acts out few time, produced faulty code once or twice but not to difficult to fix.
I guess, this is easier for us than the rest as we migrated given priority change in 3.5
2 Likes
We upgraded to Mill main branch from 3.6.4 to 3.7.0 in Upgrade to Scala 3.7.0 by lihaoyi · Pull Request #5075 · com-lihaoyi/mill · GitHub , went seamlessly, and some confusing errors we had seen in 3.7.0-RC1 seem to have been fixed in final
2 Likes
Scala 3.7.0 is now available!
See the release blogpost for more details
11 Likes
I am getting the compiler complaining in 3.7.1-RC1 by this:
extension [F[_], E, S](d: Decider[F, E, S])(using Applicative[F]) {
def decide[R](fn: S => (R, List[E])): F[R] =
decideF[R](fn.andThen(_.pure[F]))
...
}
with this:
[warn] 35 | extension [F[_], E, S](d: Decider[F, E, S])(using Applicative[F]) {
[warn] | ^
[warn] | unused implicit parameter
I am using the Applicative
via cats in _.pure[F]
This is also happening in 3.7.2-RC1-bin-20250507-c85982c-NIGHTLY
Seems like the cause is that I have sbt-tpolecat enabled and after doing this:
scalacOptions ~= { _.filterNot(Set("-Wunused:implicits", "-Wunused:params")) }
things compile in 3.7.0 - did not try the other two.
However, probably a bug in any regard.
Thank you for report, however I was not able to reproduce it. Can you help us by trying to create a reproducer? We’d really appreciate it.
Here’s the gist with snippet I’ve tried based on your inputs, but maybe there is something more going on.
It’s worth publicizing that a lint behavior is not likely to be a blocker for a release.
However, a bug report on the issue tracker is likely to receive attention, since I’m available.
3.7 is a bit more ambitious with linting, so false positives are possible.
The standard backstop is -Wconf
, which permits filtering as explained by -Wconf:help
.
Edit: I should say I’m available after morning Wordle, in the hierarchy of puzzlers.
2 Likes
I have provided scalac options that sbt-tpolecat brings along in your gist.