I am new to Scala, sbt and its REPL.
One thing I really love is the ~
option to loop a run or compile when editing files. So I end up running ~run
quite often.
But it leaks memory. As after 20-30 runs the whole sbt interactive shell crashes with:
[info] Compiling 1 Scala source to /home/[redacted]
sbt appears to be exiting abnormally.
The log file for this session is at /tmp/sbt853875123365456892.log
java.lang.OutOfMemoryError: Metaspace
Error during sbt execution: java.lang.OutOfMemoryError: Metaspace
Honestly it's not a big deal, but while I understand what an OOME is, the question I am trying to figure out - is it really what it's supposed to be? The answer is "no", but...
- is it a sbt bug? (should I try to report it?)
- is something wrong with my program? (memory leak?)