Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does SBT obviate JRebel?

Tags:

scala

sbt

My goal is to reduce Scala compilation times. I'm using Intellij IDEA 10 with Scala 2.8.1-RC1.

I've read that using SBT will reduce compilation times because it is clever about re-building only the files/classes that have changed since the last build.

I understand that JRebel has a very similar purpose. Is there any point in using JRebel instead of, or in addition to, SBT?

like image 847
David Avatar asked Nov 29 '22 18:11

David


2 Answers

They do different things. SBT has a pretty speedy continuous incremental build system. JRebel dynamically reloads classes into a running program as they are rebuilt. It's something like a Java debugger's ability to modify a running program but with far fewer annoying limitations. SBT and JRebel are complementary.

like image 192
James Iry Avatar answered Dec 05 '22 08:12

James Iry


You might also say that SBT obviates Hudson or other CI tools. Or that it obviates the red squiggly lines your IDE generates when you enter code that won't compile. But those tools are still useful even with SBT, and SBT offers lots of great features beyond CI and hot deployment.

It does obviate Maven.

SBT overlaps with JRebel for me a bit - like when I use SBT to continuously compile and redeploy a web application to jetty (~prepare-webapp). That feels quite a lot like using JRebel to continuously push changes out to a Java application container.

It offers "poor mans continuous integration" with quick code change detection and testing: http://devblog.point2.com/2009/07/27/scala-continuous-testing-with-sbt/

In general, SBT is the make/ant/maven replacement you should use for Scala. I'm constantly impressed with how it streamlines development, and I miss it when I go back to Java/Maven (even with JRebel). You should use it regardless of what other tools and frameworks you find useful.

Hope that helps :)

like image 31
Janx Avatar answered Dec 05 '22 08:12

Janx