IttayD
IttayD

Reputation: 29163

scala: anything like python/ruby development mode?

What I mean by the title is, whether there's a free framework/tool that allows me to write .scala files and have them reloaded & compiled automatically by the (web) server without the need to compile, package and deploy.

Probably javarebel can be used here, but it is not free.

Upvotes: 2

Views: 334

Answers (2)

Thomas Jung
Thomas Jung

Reputation: 33102

Scala has an interpreter (scala.tools.nsc.Interpreter.) that can be embedded. The infrastructure to load changed files should not be to hard to implement. The interesting question is how do you handle instances of older class versions? The easiest approach is to throw away the instances and the classloader.

I do vaguely remember that JRebel is free for scala development. Not sure if this was only for open-source scala projects.

Upvotes: 1

Daniel C. Sobral
Daniel C. Sobral

Reputation: 297295

JRebel, which is the new name for JavaRebel, has a free license for Scala use.

Other alternatives include using Maven's scala:cc target, which keeps compiling on the background, triggered by changes, and, in particular, the Play framework is almost perfect in this regard.

Upvotes: 5

Related Questions