我很确定我设置了emacs,insime,sbt和scala可以正确工作。我可以编辑文件并在保存并成功尝试使用Ensime的自动归于工具时查看类型错误。
问题是当我尝试构建项目时。无论是否没有任何错误,按C-c C-b b
都会给我这个输出:
Latest Compilation Results (q to quit, TAB to jump to next error)
----------------------------------------
0 errors, 0 warnings.
然后我注意到卧铺没有加载任何导致我问这个问题的东西,但是我发现,如果我通过从命令行调用sbt compile
来构建我的项目,我可以构建我的项目,并且使用repp。
我还看到,在我用sbt compile
成功构建项目后,然后尝试从事该项目并调用"增量构建"(C-c C-b r
),我会得到:
Asynchronous RPC Aborted: Error occurred in incremental builder. Check the server log.
在迷你缓冲器中。这就是*inferior-ensime-server*
缓冲区中出现的内容:
Handling RPC: (swank:builder-update-files (nil))
Error handling RPC: java.lang.NullPointerException :
scala.reflect.internal.util.BatchSourceFile.hashCode(SourceFile.scala:170)
scala.collection.mutable.FlatHashTable$HashUtils$class.elemHashCode(FlatHashTable.scala:392)
scala.collection.mutable.HashSet.elemHashCode(HashSet.scala:41)
scala.collection.mutable.FlatHashTable$class.containsEntry(FlatHashTable.scala:124)
scala.collection.mutable.HashSet.containsEntry(HashSet.scala:41)
scala.collection.mutable.HashSet.contains(HashSet.scala:58)
scala.collection.GenSetLike$class.apply(GenSetLike.scala:43)
scala.collection.mutable.AbstractSet.apply(Set.scala:45)
scala.collection.SeqLike$$anonfun$distinct$1.apply(SeqLike.scala:490)
scala.collection.immutable.List.foreach(List.scala:309)
scala.collection.SeqLike$class.distinct(SeqLike.scala:489)
scala.collection.AbstractSeq.distinct(Seq.scala:40)
scala.tools.nsc.Global$Run.compileSources(Global.scala:1531)
scala.tools.nsc.Global$Run.compileFiles(Global.scala:1643)
scala.tools.nsc.interactive.RefinedBuildManager.update0$1(RefinedBuildManager.scala:133)
scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:188)
scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:102)
org.ensime.server.IncrementalBuilder$$anonfun$act$1$$anonfun$apply$mcV$sp$1.liftedTree1$1(IncrementalBuilder.scala:124)
org.ensime.server.IncrementalBuilder$$anonfun$act$1$$anonfun$apply$mcV$sp$1.applyOrElse(IncrementalBuilder.scala:93)
scala.runtime.AbstractPartialFunction$mcVL$sp.apply$mcVL$sp(AbstractPartialFunction.scala:33)
scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:33)
scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:25)
scala.actors.InternalActor$class.receive(InternalActor.scala:123)
org.ensime.server.IncrementalBuilder.receive(IncrementalBuilder.scala:55)
org.ensime.server.IncrementalBuilder$$anonfun$act$1.apply$mcV$sp(IncrementalBuilder.scala:88)
org.ensime.server.IncrementalBuilder$$anonfun$act$1.apply(IncrementalBuilder.scala:87)
org.ensime.server.IncrementalBuilder$$anonfun$act$1.apply(IncrementalBuilder.scala:87)
scala.actors.Reactor$class.seq(Reactor.scala:285)
org.ensime.server.IncrementalBuilder.seq(IncrementalBuilder.scala:55)
scala.actors.Reactor$$anon$3.andThen(Reactor.scala:263)
scala.actors.Combinators$class.loop(Combinators.scala:28)
org.ensime.server.IncrementalBuilder.loop(IncrementalBuilder.scala:55)
scala.actors.Combinators$$anonfun$loop$1.apply(Combinators.scala:28)
scala.actors.Combinators$$anonfun$loop$1.apply(Combinators.scala:28)
scala.actors.Reactor$$anonfun$seq$1$$anonfun$apply$1.applyOrElse(Reactor.scala:282)
scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
scala.actors.ReactorTask.run(ReactorTask.scala:31)
scala.actors.ReactorTask.compute(ReactorTask.scala:63)
scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160)
scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:262)
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.pollAndExecAll(ForkJoinPool.java:915)
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:980)
scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1478)
scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Writing: (:return (:abort 205 "Error occurred in incremental builder. Check the server log.") 44)
如果我尝试使用C-c C-b b
进行完整构建,则我会得到原始的缓冲区没有显示错误或警告(无论是否曾经是这种情况),并看到原始类目录将被删除。p>为什么会发生这种情况?如何获得C-c C-b b
和C-c C-b r
正确构建项目?
编辑:
似乎正在安装ensime
的目录内生成类文件,这对我来说似乎很奇怪...
编辑2 :
我在启动时在*Messages*
中获得以下内容。我不知道这是否相关:
Eager macro-expansion failure: (error "(ensime-builder-changed-files (ensime-connection)) is not a valid place expression") [3 times]
这些问题是由于insime中的错误造成的;两者都应固定在当前的git树中:
https://github.com/ensime/ensime-src.git