Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Scala Dotty project using Intellij IDE

I created a basic Scala Dotty project using Dotty template and import the project to IntelliJ IDE.

Everything works fine when I use the sbt command line.

When I try to build or run it inside IntelliJ IDE, I got following errors:

Error:scalac: Multiple 'scala-library*.jar' files (scala-library-0.9.0-RC1.jar, scala-library-2.12.6.jar) in Scala compiler classpath in Scala SDK sbt: ch.epfl.lamp:dotty-library_0.9:0.9.0-RC1:jar

Any ideas how to solve this?

like image 946
ttt Avatar asked Jan 28 '23 19:01

ttt


1 Answers

IDE support for Dotty

Currently, the only IDE we officially support is Visual Studio Code.

Anyway when you import a project to IntelliJ IDEA check "use sbt shell". At least for me after that a test project compiles and runs with Ctrl+Shift+F10.

import

It's possible that not everything will work. For example Dotty macros don't but if I compile and run manually then they do.

like image 151
Dmytro Mitin Avatar answered Jan 30 '23 07:01

Dmytro Mitin