0

I like the idea of using Scala as a scripting language (https://www.scala-sbt.org/1.x/docs/Scripts.html). However, it always takes a long time even for a simplest Hello World script to run, presumably because sbt is recompiling the script every time.

Is there a way to instruct sbt to save the compilation results, in case the script hasn't changed since the last compilation?

SlavaSt
  • 1,493
  • 1
  • 16
  • 19
  • 1
    I think you cannot avoid recompilation fully, but you can use ammonite instead of vanilla scala REPL. Surely things you put into predef would get cached. – Mateusz Kubuszok Apr 21 '20 at 12:03
  • @MateuszKubuszok Thanks, looks like ammonite is exactly what I was looking for :) Never heard of it before, will definitely give it a try! – SlavaSt Apr 21 '20 at 13:04

0 Answers0