使用Intellij IDE运行Scala Dotty项目 [英] Run Scala Dotty project using Intellij IDE

查看:191
本文介绍了使用Intellij IDE运行Scala Dotty项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Dotty模板创建了一个基本的Scala Dotty项目,并将该项目导入Intellij IDE.

当我使用sbt命令行时,一切正常.

当我尝试在Intellij IDE中构建或运行它时,出现以下错误:

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

有什么办法解决这个问题吗?

解决方案

IDE支持对于Dotty

当前,我们正式支持的唯一IDE是 Visual Studio代码.

无论如何,当您将项目导入IntelliJ IDEA时,请选中使用sbt shell".至少对我来说,之后测试项目会编译并使用Ctrl + Shift + F10运行. >

可能并非所有功能都能正常工作.例如, Dotty宏不会,但是如果我手动编译并运行,它们就可以.

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?

解决方案

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.

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

这篇关于使用Intellij IDE运行Scala Dotty项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆