Development using sbt is unlikely to use the ~run command to say that sbt pickup is changing the code. It is very comfortable.
Now I will play a little with akka . Is there a way to return the default behavior of sbt when ctrl + D stops the application and the code loads on the fly?
Here is an example application:
object Main extends App { println("Starting actors...") val system = ActorSystem("MySystem") val myActor = system.actorOf(Props[Actors.MyActor], name = "myActor") myActor ! "test" // system.shutdown() } object Actors { class MyActor extends Actor { val log = Logging(context.system, this) def receive = { case "test" => log.info("received test") case _ => log.info("received something else") } } }
In such cases, the run and ~run commands do not interrupt ctrl + D and do not reload the code when changing. Only ctrl + C to stop all sbt. Since I understand that in the game environment there is some solution for this, because it looks like it stops the acting system on ctrl + D in ~run mode
source share