Scala 3.6 release thread

If the compiler’s parser can be

  1. cross-compiled to scala.js (to use in things like AST explorer or syntax highlighting) and
  2. cross-compiled to scala-native (to support a native version of scalafmt) and
  3. have a stable API somehow

Then I don’t think there will be anyone not welcoming using actual compiler parts for parsing – in fact it will be very welcome.

In Metals in particular I feel like it’s time to not use scalameta as the first thing after edit – it can lag behind syntax, and sometimes has worse syntax error recovery.

AFAIU, rustfmt and rust-analyzer both rely on the official rustc_ast: rustfmt/src/parse/parser.rs at master · rust-lang/rustfmt · GitHub

3 Likes

We only use scalameta for a couple of minor features, which is fine if they don’t always work for new features. The biggest issue is that we use it for parser level diagnostics and we already discussed that we should not do that.

The scalameta parser still has a lot utility and we will not be able to rewrite scalafmt at this point. We support different compiler versions at the same time, which would not be possible with Scala 2 or Scala 3 parser.

The problem also arose because I missed some syntax changes to givens that I thought are already covered. Running scalameta on the whole compiler codebase should help us get rid of that.

SDKMAN is not able to install 3.6.2. It installs 3.5.2 just fine.

It looks like the installation is finished successfully, but there is no folder / file in ~/.sdkman/candidates/scala, and sdk list scala also confirms that it’s not installed.

Anyone else experiencing this?

We’re working a fix for that, we’ll let you updated when it’s fixed

2 Likes

The problem was fixed

2 Likes

Thanks for the quick fix! :heart:

I am “welcomed” by this strange message when I start the REPL:

❯ scala
dic 12, 2024 4:21:39 P. M. org.jline.utils.Log logr
ADVERTENCIA: The terminal provider jna has been deprecated, check your configuration. This warning can be disabled by setting the system property org.jline.terminal.disableDeprecatedProviderWarning to true.
Welcome to Scala 3.6.2 (21.0.4, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                       
scala> 
2 Likes

Sorry for nagging again, but as of the time of writing, scalafmt and scalafix are still not support new given syntax in scala 3.6.2 :frowning:

I already created issue for each of those repo (one of them is closed) and asked in scalameta discord.

There are discussions on twitter and question in reddit as well.

Hope we can release those tools soon!

The version of scalameta has been updated in scalafmt, so I would expect a release soon. As for Scalafix, I asked the contributor, if he is not available I will take care of that.

5 Likes

thanks a lot! I know this take time and effort!

About the initial lack of support for the new given syntax in IntelliJ, I got a nice message from the plugin team at JetBrains about this, on their Discord. They acknowledged that the usual intent is for the plugin to be ready at release time; that it didn’t fully happen this time; and they’ll try to prevent that from recurring in the future. “That includes both improving testing on our side and the coordination process between the teams working on Scala” The Scala 3 team is also aware and will try to help to prevent it from recurring.

5 Likes