Scala 3.6.3 release thread

Scala 3.6.3-RC1 is ready for testing!

The new feature introduced in this release is -Yprofile-trace compiler option enabling the generation of trace events in a standard JSON format. These can be used by tooling to graphically inspect the amount of time needed to process sources in each compilation phase.

To use this feature run compilation with -Yprofile-enabled and -Yprofile-trace:path/to/compiler.trace to specify where traces should be saved. You can also optionally define -Yprofile-destination:path/to/profiler.output to redirect other profiler outputs that would be printed on the standard output otherwise. The final result file can rendered in the web browser using https://ui.perfetto.dev.
For more details refer to the Scala 3 PR or its original Scala implementation.

For a full list of changes and contributor credits, please refer to the release notes.

The final release is planned for 14 January 2025.

9 Likes

Scala 3.6.3-RC2 is now available!

The second release candidate fixes warnings on some platforms when using REPL (due to JLine upgrade). It does also improve given search preference warnings - these can be now supressed using @annotation.nowarn("id=205") or -Wconf:id=205 scalac options

5 Likes

Scala 3.6.3 is now available! | The Scala Programming Language

2 Likes

Found this issue:

We got this error when upgraded to 3.6.3:

[warn] Flag -classpath set repeatedly
[error] -- Error: api/target/shaded/scala-3.4.2/src_managed/main/velocity/DefaultBSONHandlers.scala:379:2 
[error] undefined: new com.github.ghik.silencer.silent # -1: TermRef(TypeRef(TermRef(TermRef(TermRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object com),object github),object ghik),object silencer),silent),<init>) at readTasty
[warn] one warning found
[error] one error found
[error] (Compile / doc) DottyDoc Compilation Failed

It happen in lichess lila-ws repo. Either downgrade to 3.6.2 or disable doc phase (Compile / doc / sources := Seq.empty) fix the the issue

1 Like

Thank you for the report, we’re working on that!
Seems like the annotation applied in ReactiveMongo-BSON for some reason leads to problems when reading TASTy.

The silent annotation used there is mocked for Scala 3 build in ReactiveMongo-BSON (GitHub - ghik/silencer: Scala compiler plugin for warning suppression used there is not cross published for Scala 3 because @nowarn from stdlib replaces it). However, it’s excluded from final jar. I believe that the error is coused by inconsistency introduced by cleanup of the silencer plugin usage has caused this issue

The problem is also present in 3.6.4-RC1, but we’ll try to fix it ASAP and backport fix in RC2.

1 Like

Tracking thread for the issue Scaladoc fatal error when reading inconsistent TASTy/ClassFiles · Issue #22447 · scala/scala3 · GitHub

It seems like this bug existed in Scala before 3.6.3, I. was able to get the same results also in older compilers, eg. 3.4 series. Is it possible some other changes could have triggered the new behaviour?

For lila-ws, I cannot downgrade scala version to 3.4 due to other dependencies, but it works with 3.6.2, so probably some changes between 3.6.3 and 3.6.2.

1 Like

A bit different but maybe related to this issue, we have another lichess’s project that have issue with doc:

 [error] class lila.search.ingestor.app.config$package cannot be unpickled because no class file was found for denot: val <none>
[error] class lila.search.ingestor.mongo.game$package cannot be unpickled because no class file was found for denot: val <none>
[warn] one warning found
[error] two errors found
[error] (ingestor / Compile / doc) DottyDoc Compilation Failed