Scalop的java问题和升级到scala 2.11
我试图更新到Scala 2.11.0-M5,但遇到了问题。我使用Scalop,所以我需要用Scala2.11.0-M5构建它,因为我找不到预构建的jar。scallop的编译进行得很顺利,但是当我尝试运行“sbt publish local”时,当它尝试构建文档时,我会遇到以下错误。在我看来,这似乎是试图建立一些sbt源文件。我试图为sbt(或使用scala 2.11.0-M5构建的sbt jar)找到更新的源代码,但未能找到。有人能提供一些建议吗
非常感谢
[info] Generating Scala API documentation for main sources to /Users/jetson/develop/scala/scala-2.11/scallop/target/scala-2.11/api...
[info] Compiling 12 Scala sources to /Users/jetson/develop/scala/scala-2.11/scallop/target/scala-2.11/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.11.0-M5. Compiling...
/var/folders/m9/fn_sw0s970q02nf8cng94j640000gn/T/sbt_1dff5778/CompilerInterface.scala:246: error: recursive method rootLoader needs result type
override def rootLoader = if(resident) newPackageLoaderCompat(rootLoader)(compiler.classPath) else super.rootLoader
^
/var/folders/m9/fn_sw0s970q02nf8cng94j640000gn/T/sbt_1dff5778/CompilerInterface.scala:246: error: value rootLoader is not a member of scala.tools.nsc.backend.JavaPlatform
override def rootLoader = if(resident) newPackageLoaderCompat(rootLoader)(compiler.classPath) else super.rootLoader
^
two errors found
[info] 'compiler-interface' not yet compiled for Scala 2.11.0-M5. Compiling...
/var/folders/m9/fn_sw0s970q02nf8cng94j640000gn/T/sbt_4baba5ae/CompilerInterface.scala:246: error: recursive method rootLoader needs result type
override def rootLoader = if(resident) newPackageLoaderCompat(rootLoader)(compiler.classPath) else super.rootLoader
^
/var/folders/m9/fn_sw0s970q02nf8cng94j640000gn/T/sbt_4baba5ae/CompilerInterface.scala:246: error: value rootLoader is not a member of scala.tools.nsc.backend.JavaPlatform
override def rootLoader = if(resident) newPackageLoaderCompat(rootLoader)(compiler.classPath) else super.rootLoader
^
two errors found
[error] (compile:doc) Error compiling sbt component 'compiler-interface'
[error] (compile:compile) Error compiling sbt component 'compiler-interface'
[error] Total time: 15 s, completed Oct 21, 2013 11:41:14 AM
# 1 楼答案
确保实际使用sbt 0.13构建。x、 如果您已经安装了最新版本的sbt,但仍然出现此错误,则sbt版本可能正在被项目/构建覆盖。属性文件
编辑项目/生成。属性,因此它包括sbt。版本=0.13.2或当前sbt版本的任何内容