SBT 0.13.7 和 Scala 2.11.5 版本兼容性问题

SBT 0.13.7 and Scala 2.11.5 version compatibility issues

正在试用 sbt 版本 0.13.7 和 scala 版本 2.11.5。两者都是目前最新的。他们一起工作吗?当我 运行 sbt clean compile 时,它打印:

[info] 'compiler-interface' not yet compiled for Scala 2.11.5. Compiling...
error: java.lang.NoClassDefFoundError: scala/tools/nsc/typechecker/Infer$Inferencer

改成scala 2.11.4后就ok了:

[info] 'compiler-interface' not yet compiled for Scala 2.11.4. Compiling...
[info]   Compilation completed in 13.434 s

我找不到任何关于 sbt 和 scala 版本兼容性的相关资源。会不会跟Does sbt build against scala 2.11?有关?

您可以尝试删除您的本地缓存,根据我的经验,有时情况不佳:

rm -r ~/.sbt/boot/
rm -r ~/.ivy2/cache/org.scala-lang/
rm -r ~/.ivy2/cache/org.scala-sbt/

下面会更好

rm -rf ~/.sbt/boot/
rm -rf ~/.ivy2/cache/org.scala-lang/
rm -rf ~/.ivy2/cache/org.scala-sbt/

如果失败,运行激活几次。