在scala ide上设置正确的scala版本

时间:2017-09-27 15:14:10

标签: scala-ide scala-macro-paradise

我正在尝试使用scala IDE上的项目,但我在scala IDE上遇到了构建问题 在这个项目上,这个项目很好。我使用了eclipse sbt插件并在scala IDE上导入了该项目。存在构建错误,这使得ide几乎无用 其中一个错误是Compiler plugin paradise_2.12.1-2.1.0.jar is cross-compiled with incompatible version for this project: 2.12.1 vs 2.12.2
我认为scala次要版本兼容,但我发现一些实验模块有例外。宏天堂插件是其中一个例外吗? 我该如何解决?我可以告诉scala IDE使用2.12.1吗? sbt eclipse插件不应该处理这个吗?我应该报告错误(到哪个项目)? 我正在使用的项目将scala版本定义为“2.12.1”,但我宁愿不改变它。我正在使用scala ide版本4.6.1。

1 个答案:

答案 0 :(得分:3)

here's the settings to change the scala compiler

  • right click on your project -> choose "properties"
  • from the menu tree on the left select 'Scala compiler'
  • check "use project settings" if unchecked
  • select the appropriate Scala installation from the 'Scala Installation' drop down
  • close the project properties window
  • rebuild project

my personal peeve is that when I run the eclipse plugin command from sbt, it always resets the scala installation for my project to " Latest 2.12 bundle (dynamic)" so I've gotten pretty use to manually resetting my scala compiler version (along with my build path source directories).

If you need to (re)set your scala library container you can also do this in the project properties window (via the "Java Build Path" -> Libraries section). You may need to do this if you don't have an explicit fixed 2.12.1 installation available as an option in the above drop down.