I am using SBT (0.7.4) with Scala(2.7.7) to build my Scala project and sometimes I get following error when building the project.
So far the only remedy seems to retry it or do a clean
on the SBT shell which adds delay in build process. No definite pattern of occurrence of the error has emerged but it happens quite a lot when I am using triggered execution of test cases: ~test
Please note the code base has no error. If I do a clean and build again without any source code change build gives no error. Sometimes, build works without even cleaning code base.
java.lang.AssertionError: assertion failed: List(class Old, class Old)
at scala.Predef$.assert(Predef.scala:92)
at scala.tools.nsc.symtab.Symbols$Symbol.suchThat(Symbols.scala:820)
at scala.tools.nsc.symtab.Symbols$Symbol.linkedClassOfModule(Symbols.scala:962)
at xsbt.Analyzer$Compat$.linkedClass(Analyzer.scala:225)
at xsbt.Analyzer$AnalyzerPhase$$anonfun$run$1$$anonfun$apply$7.apply(Analyzer.scala:96)
at xsbt.Analyzer$AnalyzerPhase$$anonfun$run$1$$anonfun$apply$7.apply(Analyzer.scala:85)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.collection.mutable.FlatHashTable$$anon$1.foreach(FlatHashTable.scala:113)
at scala.Iterable$class.foreach(Iterable.scala:256)
at scala.collection.mutable.HashSet.foreach(HashSet.scala:31)
at xsbt.Analyzer$AnalyzerPhase$$anonfun$run$1.apply(Analyzer.scala:85)
at xsbt.Analyzer$AnalyzerPhase$$anonfun$run$1.apply(Analyzer.scala:37)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
at xsbt.Analyzer$AnalyzerPhase.run(Analyzer.scala:37)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
at scala.tools.nsc.Global$Run.compile(Global.scala:667)
at xsbt.CompilerInterface.run(CompilerInterface.scala:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at xsbt.AnalyzingCompiler.call(AnalyzingCompiler.scala:40)
at xsbt.AnalyzingCompiler.apply(AnalyzingCompiler.scala:18)
at sbt.Compile.processScala(Compile.scala:76)
at sbt.CompilerCore$$anonfun$1.apply(Compile.scala:27)
at sbt.CompilerCore$$anonfun$1.apply(Compile.scala:27)
at sbt.CompilerCore$$anonfun$process$1$1.apply(Compile.scala:22)
at sbt.CompilerCore$$anonfun$process$1$1.apply(Compile.scala:22)
at sbt.CompilerCore$$anonfun$doCompile$3.apply(Compile.scala:45)
at sbt.CompilerCore$$anonfun$doCompile$3.apply(Compile.scala:42)
at scala.Option.orElse(Option.scala:102)
at sbt.CompilerCore.doCompile(Compile.scala:41)
at sbt.CompilerCore.apply(Compile.scala:29)
at sbt.AbstractCompileConditional.run$1(Conditional.scala:341)
at sbt.AbstractCompileConditional$$anonfun$3.apply(Conditional.scala:344)
at sbt.AbstractCompileConditional$$anonfun$3.apply(Conditional.scala:344)
at sbt.classfile.Analyze$.apply(Analyze.scala:110)
at sbt.AbstractCompileConditional.execute(Conditional.scala:344)
at sbt.Conditional$class.run(Conditional.scala:43)
at sbt.AbstractCompileConditional.run(Conditional.scala:231)
at sbt.BasicScalaProject.sbt$BasicScalaProject$$doCompile(DefaultProject.scala:259)
at sbt.BasicScalaProject$$anonfun$compileAction$1.apply(DefaultProject.scala:273)
at sbt.BasicScalaProject$$anonfun$compileAction$1.apply(DefaultProject.scala:273)
at sbt.TaskManager$Task.invoke(TaskManager.scala:62)
at sbt.impl.RunTask.doRun$1(RunTask.scala:77)
at sbt.impl.RunTask.runTask(RunTask.scala:85)
at sbt.impl.RunTask.sbt$impl$RunTask$$runIfNotRoot(RunTask.scala:60)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:48)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:48)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:131)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:131)
at sbt.Control$.trapUnit(Control.scala:19)
at sbt.Distributor$Run$Worker.run(ParallelRunner.scala:131)