Scala IntelliJ plugin broken with 3.5?

When I set the Scala version to the latest 3.5 nightly in my project, the code lights up with red. Even some basic Scala keywords are red or underlined with red. Do others experience this issue as well?

Yes that’s normal. IntelliJ is still in the process of catching up to Scala 3.

IntelliJ only allows creating a new project up to Scala 3.4.2 for now (and even that doesn’t work too well).

I’m trying 3.5.0-RC1-bin-20240512-99c4c00-NIGHTLY right now, IntelliJ cannot finish extracting the project structure after 20 minutes. Still going…

Edit: I stopped and restarted it a few times, finally finished extracting after 4 minutes in the last attempt! :partying_face:

1 Like

Unfortunately, my latest code only compiles with Scala 3.5 (due to some compiler bug in earlier versions, I presume) :frowning:

That’s the price you pay for riding on the bleeding edge :wink:

Have you tried VS Code + Metals? I’ve also been on the bleeding-edge, especially with Scala Native, and Metals works great.

VS Code + metals does work indeed, but not with the bleeding edge. Currently supported - Scala 3: 3.3.3, 3.3.2, 3.3.1, 3.2.2, 3.1.3. Having said that, I use the nightly and it is usable with 3.4.2-RC1. See below.

HTHs

That list is not being actively updated. Metals will work with every new Scala 3 version right after that version is uploaded to maven central. For Scala 2 we usually take a bit longer but new versions are only announced once the support for specific version is available in the latest nightlies and the latest stable version.

3 Likes

The issue is already fixed in the recent nightly - https://youtrack.jetbrains.com/issue/SCL-22539/Keyword-inline-not-recognized-with-Scala-3.5.0-RC1

3 Likes

There’s a lot more than just inline not being recognized in my case.

Exactly. The plugin did not handle the source using 3.5 as Scala 3 before the fix at all. What plugin version are you running now?

1 Like

I just switched to IntelliJ EAP and got the latest Scala plugin nightly (though the latter might not have been needed). The spurious errors are gone :slight_smile:

2 Likes