setting correct scala version on scala ide

有些话、适合烂在心里 提交于 2019-12-10 10:40:10

问题


I'm trying to work on a project on scala IDE but I've having build problems on scala IDE.
On sbt the project builds fine. I used the eclipse sbt plugin and imported the project on scala IDE. There were build errors, which makes the ide close to useless.
One of the errors is 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
I thought scala minor versions were compatible, though I see there is an exception for some experimental modules. Is the macro paradise plugin one of those exceptions?
How can I fix it? Can I tell scala IDE to use 2.12.1? Shouldn't the sbt eclipse plugin take care of that? Should I report a bug(to which project)?
The project on which I'm working defines scala version to be "2.12.1", but I'd rather not change it. I'm using scala ide version 4.6.1.


回答1:


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.



来源:https://stackoverflow.com/questions/46451502/setting-correct-scala-version-on-scala-ide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!