2013-10-21 49 views
4

我試圖更新到Scala 2.11.0-M5,但我遇到了問題。我使用扇貝,所以我需要用Scala 2.11.0-M5來構建它,因爲我找不到預製的jar。扇貝編譯進行得很順利,但是當我嘗試運行「sbt publish-local」時,在嘗試編譯文檔時遇到下面的錯誤。對我來說,這看起來像是試圖建立一些sbt源文件。我試圖找到更新的sbt源代碼(或者用scala 2.11.0-M5構建的sbt jar),但是不能。任何人都可以提供建議嗎?扇貝問題和更新到Scala 2.11

非常感謝!

[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

確保你實際上是用sbt 0.13.x構建的。如果你已經安裝了最新版本的sbt並仍然出現這個錯誤,那麼sbt版本可能會被project/build.properties文件覆蓋。

編輯project/build.properties,因此它包含sbt.version = 0.13.2或當前sbt版本。

+0

謝謝!這是我的問題 - 我甚至沒有意識到加載舊版本。 – Nate

+3

我使用maven,並將scala-maven-plugin升級到3.2.1版本。 – OleTraveler