我正在将大型项目升级到2.10.4到2.11.4.我有一个编译器崩溃,无论如何显示导致崩溃的源文件的名称?我能够通过'last everitt/compile:compile'获得完整的跟踪
我将恢复擦除项目的大块以二进制搜索崩溃的原因.
这是跟踪btw:
java.lang.NullPointerException at scala.tools.nsc.typechecker.NamesDefaults$class.baseFunBlock$1(NamesDefaults.scala:130) at scala.tools.nsc.typechecker.NamesDefaults$class.transformNamedApplication(NamesDefaults.scala:375) at scala.tools.nsc.Global$$anon$1.transformNamedApplication(Global.scala:450) at scala.tools.nsc.typechecker.NamesDefaults$class.transformNamedApplication(NamesDefaults.scala:326) at scala.tools.nsc.Global$$anon$1.transformNamedApplication(Global.scala:450) at scala.tools.nsc.typechecker.Typers$Typer.tryNamesDefaults$1(Typers.scala:3298) at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3367) at scala.tools.nsc.typechecker.Typers$Typer.tryNamesDefaults$1(Typers.scala:3353) at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3367) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$tryTypedApply$1$1.apply(Typers.scala:4404) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$tryTypedApply$1$1.apply(Typers.scala:4404) at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:689) at scala.tools.nsc.typechecker.Typers$Typer.tryTypedApply$1(Typers.scala:4404) at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4449) at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4484) at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5242) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5259) at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5295) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5322) at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5269) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5273) at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:3094) at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$class.typedArgWithFormal$1(PatternTypers.scala:112) at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$$anonfun$2.apply(PatternTypers.scala:115) at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$$anonfun$2.apply(PatternTypers.scala:115) at scala.runtime.Tuple2Zipped$$anonfun$map$extension$1.apply(Tuple2Zipped.scala:42) at scala.runtime.Tuple2Zipped$$anonfun$map$extension$1.apply(Tuple2Zipped.scala:40) at scala.collection.immutable.List.foreach(List.scala:381) at scala.runtime.Tuple2Zipped$.map$extension(Tuple2Zipped.scala:40) at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$class.typedArgsForFormals(PatternTypers.scala:115) at scala.tools.nsc.typechecker.Typers$Typer.typedArgsForFormals(Typers.scala:107) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$handleMonomorphicCall$1(Typers.scala:3384) at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3409) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$tryTypedApply$1$1.apply(Typers.scala:4404) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$tryTypedApply$1$1.apply(Typers.scala:4404) at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:676) at scala.tools.nsc.typechecker.Typers$Typer.tryTypedApply$1(Typers.scala:4404) at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4449) at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4484) at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5242) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5259) at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5295) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5322) at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5269) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5273) at scala.tools.nsc.typechecker.Typers$Typer.typedAssign$1(Typers.scala:4136) at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5223) at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5252) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5259) at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5295) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5322) at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5269) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5273) at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2341) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5217) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5217) at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5216) at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5252) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5259) at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5295) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5322) at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5269) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5273) at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:5504) at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:2167) at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5207) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5258) at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5295) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5322) at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5269) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5273) at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5351) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2977) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$60.apply(Typers.scala:3081) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$60.apply(Typers.scala:3081) at scala.collection.immutable.List.loop$1(List.scala:172) at scala.collection.immutable.List.mapConserve(List.scala:188) at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3081) at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1880) at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1721) at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5208) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5258) at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5295) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5322) at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5269) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5273) at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5351) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2977) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$60.apply(Typers.scala:3081) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$60.apply(Typers.scala:3081) at scala.collection.immutable.List.loop$1(List.scala:172) at scala.collection.immutable.List.mapConserve(List.scala:188) at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3081) at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:4918) at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5211) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5258) at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5295) at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5322) at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5269) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5273) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5347) at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102) at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:428) at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:419) at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:428) at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94) at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93) at scala.collection.Iterator$class.foreach(Iterator.scala:743) at scala.collection.AbstractIterator.foreach(Iterator.scala:1195) at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93) at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1338) at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1325) at scala.tools.nsc.Global$Run.compileSources(Global.scala:1320) at scala.tools.nsc.Global$Run.compile(Global.scala:1418) at xsbt.CachedCompiler0.run(CompilerInterface.scala:116) at xsbt.CachedCompiler0.run(CompilerInterface.scala:95) at xsbt.CompilerInterface.run(CompilerInterface.scala:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101) at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47) at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41) at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:97) at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:97) at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:97) at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:162) at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:96) at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:139) at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:86) at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:38) at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:36) at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31) at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:39) at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38) at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:66) at sbt.inc.Incremental$.compile(Incremental.scala:38) at sbt.inc.IncrementalCompile$.apply(Compile.scala:26) at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:153) at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:70) at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:45) at sbt.Compiler$.apply(Compiler.scala:74) at sbt.Compiler$.apply(Compiler.scala:65) at sbt.Defaults$.sbt$Defaults$$compileTaskImpl(Defaults.scala:777) at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:769) at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:769) at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40) at sbt.std.Transform$$anon$4.work(System.scala:63) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226) at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17) at sbt.Execute.work(Execute.scala:235) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226) at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159) at sbt.CompletionService$$anon$2.call(CompletionService.scala:28) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
编辑:删除并评论出大量文件后,我将其简化为:
case class A(x: String) case class B(a: A, y: String) class C(var b: B) { def a = b.a b.copy(a = a.copy()) }
编辑2:我能说的最好的是,没有一个好的选择,我将继续前进,我提交了一个关于这个问题的错误报告(SI-9035).如果有人知道选项/方式,请发表答案!与此同时,我将继续使用自2.6以来一直使用的方法:擦除文件并注释掉行,直到我将其归结为最小示例并提交错误报告.谢谢你的想法.