Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 扇贝的问题和升级到scala 2.11_Java_Scala - Fatal编程技术网

Java 扇贝的问题和升级到scala 2.11

Java 扇贝的问题和升级到scala 2.11,java,scala,Java,Scala,我试图更新到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 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

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


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

谢谢!这是我的问题——我甚至没有意识到sbt正在加载一个旧版本。我使用maven,并将scala maven插件升级到3.2.1版,为我解决了这个问题。