title: Is java.lang.OutOfMemoryError: Metaspace normal in sbt REPL?
body: <p>I am new to Scala, sbt and its <a href="https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop" rel="noreferrer">REPL</a>. 
  One thing I really love is the <code>~</code> option to loop a run or compile when editing files. So I end up running <code>~run</code> quite often.</p>
  
  <p>But it leaks memory. As after 20-30 runs the whole sbt interactive shell crashes with:</p>
  
  <pre><code>[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
  </code></pre>
  
  <p>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...</p>
  
  <ul>
  <li>is it a sbt bug? (should I try to report it?)</li>
  <li>is something wrong with my program? (memory leak?)</li>
  </ul>