Open scabug opened 10 years ago
Imported From: https://issues.scala-lang.org/browse/SI-8477?orig=1 Reporter: @cvogt Affected Versions: 2.10.4 See #8478
@retronym said: Related to #8478
@retronym said (edited on Apr 6, 2014 7:24:02 PM UTC):
[error] uncaught exception during compilation: java.lang.StackOverflowError
[trace] Stack trace suppressed: run last compile:compile for the full output.
^
|--- that part is important! :)
[error] (compile:compile) java.lang.StackOverflowError
[error] Total time: 80 s, completed Apr 6, 2014 1:51:01 PM
I saw a SOE in implicit search when I first ran the test for #8478. Typechecking consumes stack proportional to the depth of the trees, and summoning a implicit for a long HList, element-by-element, will lead down that path pretty quickly.
@cvogt said: ah right, the stack trace would have been useful, my bad. And exactly, I saw it on first compile, but not again. Why does it work in subsequent compiles? And I guess HLists just require to increase the stack size for compilation...
I have only been able to reproduce this once, but not repeatedly. It may cause the crashes described here: http://stackoverflow.com/questions/22842486/eclipse-scala-ide-slow-and-crashes-caused-by-slick-generated-hcon-hlist
Expected result: compiles fine
Actual result:
Reproduce code (using Slick 2.0.1 and Scala 2.10.4):