SBT-based build manager

One of the latest additions to the Eclipse Scala plugin is the new build manager. In comparison to our original Refined Build Manager, which is now deprecated and which was using some of the internal mechanisms of the compiler, the new one is based on the 0.10.x branch of the SBT's dependency tracking mechanisms (https://github.com/harrah/xsbt).

How to enable the SBT builder

At this moment, the SBT builder is not the default project builder. To enable, you need to select it on the 'Build Manager' tab in Project configuration (or globally, in the Scala compiler preferences).

 

Some of the advantages include:

As some of you will notice, SBT-based build manager can sometimes trigger recompilation of more files than the old one used to do. This is because of a different way the dependencies are resolved and how source code changes are detected. It is a pure SBT dependency tracking mechanism so if you have used SBT before you will know what to expect. The disadvantage of this is that for projects that have very complicated dependencies between classes it can be very pessimistic about which files need to be recompiled and recompilation can take longer than what you might initially expect. The advantage is that it will be more correct and less error prone than the old build manager (as a proof see the number of bugs that were closed just by introducing this new feature). In the future we plan to introduce some of the logic of the Refined Build Manager that compared directly the symbols for each of the class to further reduce compliation times.

 

There is not need to define your SBT project file.

The new SBT-based build manager uses only the definition provided for the project in Eclipse, similarly to the old Refined Build Manager and Java builder. So you can use it immediately. 

How to use it

To enable the new build manager go to Window -> Preferences -> Scala -> Compiler -> Build Manager Tab and select sbt from the list. This will set the new build manager as a global configuration but you can easily do it for selected project by righ-clicking on a project -> Properties -> Scala Compiler -> Build Manager Tab and again sbt.

Have fun and feel free to give us feedback either on a mailing list or in bug tracker.