Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsupportedOperationException: tail of empty list in 0.13.6-M1 #1587

Closed
puffnfresh opened this issue Sep 10, 2014 · 8 comments
Closed

UnsupportedOperationException: tail of empty list in 0.13.6-M1 #1587

puffnfresh opened this issue Sep 10, 2014 · 8 comments

Comments

@puffnfresh
Copy link
Contributor

Getting this problem when running a test task in 0.13.6-M1 (test:compile succeeds fine):

java.lang.UnsupportedOperationException: tail of empty list
    at scala.collection.immutable.Nil$.tail(List.scala:422)
    at scala.collection.immutable.Nil$.tail(List.scala:417)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.subst(TypeMaps.scala:745)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.substFor(TypeMaps.scala:747)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:753)
    at scala.reflect.internal.Types$Type.substSym(Types.scala:715)
    at scala.reflect.internal.Symbols$class.deriveType2(Symbols.scala:3535)
    at scala.reflect.internal.SymbolTable.deriveType2(SymbolTable.scala:16)
    at scala.reflect.internal.Types$ExistentialType.skolemizeExistential(Types.scala:2629)
    at scala.reflect.internal.Types$Type.skolemizeExistential(Types.scala:481)
    at scala.reflect.internal.tpe.TypeComparers$class.secondTry$1(TypeComparers.scala:445)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:411)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:278)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$class.isSubArg$1(Types.scala:4116)
    at scala.reflect.internal.Types$$anonfun$isSubArgs$2.apply(Types.scala:4120)
    at scala.reflect.internal.Types$$anonfun$isSubArgs$2.apply(Types.scala:4120)
    at scala.reflect.internal.util.Collections$class.corresponds3(Collections.scala:24)
    at scala.reflect.internal.SymbolTable.corresponds3(SymbolTable.scala:16)
    at scala.reflect.internal.Types$class.isSubArgs(Types.scala:4120)
    at scala.reflect.internal.SymbolTable.isSubArgs(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:402)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:278)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$Type.$less$colon$less(Types.scala:779)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.loop$1(Implicits.scala:557)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.checkCompatibility(Implicits.scala:559)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.normSubType(Implicits.scala:373)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.matchesPt(Implicits.scala:477)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.scala$tools$nsc$typechecker$Implicits$ImplicitSearch$$matchesPt(Implicits.scala:487)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.survives(Implicits.scala:821)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation$$anonfun$20$$anonfun$21.apply(Implicits.scala:877)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation$$anonfun$20$$anonfun$21.apply(Implicits.scala:877)
    at scala.collection.TraversableLike$$anonfun$filterImpl$1.apply(TraversableLike.scala:259)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at scala.collection.TraversableLike$class.filterImpl(TraversableLike.scala:258)
    at scala.collection.TraversableLike$class.filter(TraversableLike.scala:270)
    at scala.collection.AbstractTraversable.filter(Traversable.scala:104)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation$$anonfun$20.apply(Implicits.scala:877)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation$$anonfun$20.apply(Implicits.scala:876)
    at scala.collection.immutable.List.flatMap(List.scala:327)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.<init>(Implicits.scala:876)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:991)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1352)
    at scala.tools.nsc.typechecker.Implicits$class.inferImplicit(Implicits.scala:73)
    at scala.tools.nsc.Global$$anon$1.inferImplicit(Global.scala:439)
    at scala.tools.nsc.typechecker.Implicits$class.inferImplicit(Implicits.scala:38)
    at scala.tools.nsc.Global$$anon$1.inferImplicit(Global.scala:439)
    at scala.tools.nsc.typechecker.Typers$Typer.applyImplicitArgs(Typers.scala:145)
    at scala.tools.nsc.typechecker.Typers$Typer.adaptToImplicitMethod$1(Typers.scala:822)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1151)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1148)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit1(Implicits.scala:648)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit0(Implicits.scala:585)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.scala$tools$nsc$typechecker$Implicits$ImplicitSearch$$typedImplicit(Implicits.scala:454)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.rankImplicits(Implicits.scala:906)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.findBest(Implicits.scala:934)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:991)
    at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1370)
    at scala.tools.nsc.typechecker.Implicits$class.inferImplicit(Implicits.scala:73)
    at scala.tools.nsc.Global$$anon$1.inferImplicit(Global.scala:439)
    at scala.tools.nsc.typechecker.Implicits$class.inferImplicit(Implicits.scala:38)
    at scala.tools.nsc.Global$$anon$1.inferImplicit(Global.scala:439)
    at scala.tools.nsc.typechecker.Typers$Typer.applyImplicitArgs(Typers.scala:145)
    at scala.tools.nsc.typechecker.Typers$Typer.adaptToImplicitMethod$1(Typers.scala:822)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1151)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5307)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)
    at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5369)
    at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5375)
    at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:4714)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5241)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5257)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$92.apply(Typers.scala:4428)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$92.apply(Typers.scala:4428)
    at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:696)
    at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4427)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4482)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5240)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5257)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)
    at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:5502)
    at scala.tools.nsc.typechecker.Typers$Typer.typedValDefImpl(Typers.scala:1966)
    at scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1929)
    at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5203)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5256)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)
    at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5349)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2985)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3089)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3089)
    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:3089)
    at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1892)
    at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1779)
    at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5207)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5256)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)
    at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5349)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2985)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3089)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3089)
    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:3089)
    at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:4916)
    at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5209)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5256)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5345)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:410)
    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:1177)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1557)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1542)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1537)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1644)
    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:744)
@puffnfresh
Copy link
Contributor Author

0.13.6-M1 worked fine with scalac 2.10 but failed after we upgraded to scalac 2.11

0.13.5 is able to run the tests task with scalac 2.11

@puffnfresh
Copy link
Contributor Author

Seems fixed in 0.13.6-RC3

@puffnfresh
Copy link
Contributor Author

Nope, the problem is just less obvious in RC3 for some reason.

@puffnfresh puffnfresh reopened this Sep 10, 2014
@jsuereth
Copy link
Member

Is this an sbt specific issue? (error in typer). I.e. do you see it when running scalac by itself?

Additionally, any chance you can show us the code which is failing to compile? As the error message is coming from inside Scalac, it's a bit hard for me to guess what's going on :)

@puffnfresh
Copy link
Contributor Author

How do I figure out what sbt is trying to compile? This is after I run test:compile and try to run the test task. Everything in my project should be compiled, right?

@jsuereth
Copy link
Member

if you run with debug enabled (type debug before test) then it will show you. Oddly, it's trying to compile SOMETHING. Could be one of those "something is touching things" recompiles

@puffnfresh
Copy link
Contributor Author

You were right and I've narrowed this down to a scalac error. I've filed an issue, here:

https://issues.scala-lang.org/browse/SI-8844

@jsuereth
Copy link
Member

@puffnfresh thanks for looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants