4

我尝试更新到 Scala 2.11.0-M5,但遇到了问题。我使用扇贝,所以我需要使用 Scala 2.11.0-M5 构建它,因为我找不到预构建的 jar。扇贝的编译运行良好,但是当我尝试运行“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
4

1 回答 1

4

确保您实际上是使用 sbt 0.13.x 构建的。如果您安装了最新版本的 sbt 并且仍然出现此错误,则 sbt 版本可能被 project/build.properties 文件覆盖。

编辑 project/build.properties 使其包含 sbt.version=0.13.2 或任何当前 sbt 版本。

于 2014-04-28T19:55:18.717 回答