termux
termux

Reputation: 341

Stackoverflow with scala specs2

I'm currently writing some unit tests for a play application in scala using the specs2 library. I constantly have a stack overflow error durring the compilation process. I've splitted the chain into multiple tests, but some tests are quite huge and the error remains ... I didn't succeed to change the size of the stack (or the error stay, even if I put a huge value, and modify the system limit). Anyone got an idea? Regards,

Upvotes: 0

Views: 307

Answers (2)

Eric
Eric

Reputation: 15557

You can now use string interpolation and not have any more compilation issues.

Upvotes: 0

Bill Venners
Bill Venners

Reputation: 3669

This problem is inherent in the design of specs2. You may want to try ScalaTest. It doesn't have the problem. Short of that you need to increase your stack size. You said you tried that, so either it didn't work or you didn't increase it enough. Not sure how you are compiling, but to get scalac to increase its stack size you could try something like this before compiling:

JAVA_OPTS="-server -Xmx4096M -Xms256M -Xss20M" export JAVA_OPTS

Upvotes: 1

Related Questions