Skip to content

0.13.11 regression: incremental compiler: IndexOutOfBoundsException in ExtractAPI #2497

@SethTisue

Description

@SethTisue

this turned up in the Scala community build at e.g. https://scala-ci.typesafe.com/job/scala-2.11.x-jdk8-integrate-community-build/166/consoleFull, in @lihaoyi's fastparse project.

possible interested parties: @adriaanm, @Duhemm?

how to reproduce: hub clone lihaoyi/fastparse; cd fastparse; edit project/build.properties and change 0.13.9 to 0.13.11; sbt sbt fastparseJVM/test

resulting stack trace:

[info] Compiling 9 Scala sources to /Users/tisue/fastparse/fastparse/jvm/target/scala-2.11/test-classes...
java.lang.IndexOutOfBoundsException: 0
    at scala.collection.LinearSeqOptimized$class.apply(LinearSeqOptimized.scala:65)
    at scala.collection.immutable.List.apply(List.scala:84)
    at xsbt.ExtractAPI.makeParameter$1(ExtractAPI.scala:295)
    at xsbt.ExtractAPI.xsbt$ExtractAPI$$parameterS$1(ExtractAPI.scala:286)
    at xsbt.ExtractAPI$$anonfun$parameterList$1$1.apply(ExtractAPI.scala:225)
    at xsbt.ExtractAPI$$anonfun$parameterList$1$1.apply(ExtractAPI.scala:225)
    at scala.collection.immutable.List.map(List.scala:273)
    at xsbt.ExtractAPI.parameterList$1(ExtractAPI.scala:225)
    at xsbt.ExtractAPI.build$1(ExtractAPI.scala:246)
    at xsbt.ExtractAPI.defDef(ExtractAPI.scala:303)
    at xsbt.ExtractAPI.xsbt$ExtractAPI$$definition(ExtractAPI.scala:419)
    at xsbt.ExtractAPI$$anonfun$xsbt$ExtractAPI$$processDefinitions$1.apply(ExtractAPI.scala:400)
    at xsbt.ExtractAPI$$anonfun$xsbt$ExtractAPI$$processDefinitions$1.apply(ExtractAPI.scala:400)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:252)
    at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:186)
    at xsbt.ExtractAPI.xsbt$ExtractAPI$$processDefinitions(ExtractAPI.scala:400)
    at xsbt.ExtractAPI$$anonfun$mkStructure$3.apply(ExtractAPI.scala:397)
    at xsbt.ExtractAPI$$anonfun$mkStructure$3.apply(ExtractAPI.scala:397)
    at xsbt.Message$$anon$1.apply(Message.scala:7)
    at xsbti.SafeLazy$$anonfun$apply$1.apply(SafeLazy.scala:7)
    at xsbti.SafeLazy$Impl._t$lzycompute(SafeLazy.scala:18)
    at xsbti.SafeLazy$Impl._t(SafeLazy.scala:16)
    at xsbti.SafeLazy$Impl.get(SafeLazy.scala:22)
    at xsbt.ExtractAPI$$anonfun$forceStructures$1.apply(ExtractAPI.scala:144)
    at xsbt.ExtractAPI$$anonfun$forceStructures$1.apply(ExtractAPI.scala:144)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at xsbt.ExtractAPI.forceStructures(ExtractAPI.scala:144)
    at xsbt.ExtractAPI.forceStructures(ExtractAPI.scala:145)
    at xsbt.ExtractAPI.forceStructures(ExtractAPI.scala:145)
    at xsbt.ExtractAPI.forceStructures(ExtractAPI.scala:145)
    at xsbt.ExtractAPI.forceStructures(ExtractAPI.scala:145)
    at xsbt.ExtractAPI.forceStructures(ExtractAPI.scala:145)
    at xsbt.API$ApiPhase.processScalaUnit(API.scala:53)
    at xsbt.API$ApiPhase.processUnit(API.scala:38)
    at xsbt.API$ApiPhase.apply(API.scala:36)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:440)
    at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:431)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:440)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.collection.Iterator$class.foreach(Iterator.scala:742)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:398)
    at xsbt.API$ApiPhase.run(API.scala:31)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1501)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1486)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1481)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1582)
    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:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
    at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
    at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
    at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
    at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:68)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:67)
    at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:95)
    at sbt.inc.Incremental$.compile(Incremental.scala:67)
    at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
    at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
    at sbt.Compiler$.compile(Compiler.scala:152)
    at sbt.Compiler$.compile(Compiler.scala:138)
    at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:860)
    at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:851)
    at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:849)
        [...]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions