Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Merge name hashing branch that improves incremental compiler #1010
Name hashing has been merged to sbt and released with sbt 0.13.2-M1!
The name hashing branch consists of 6 major components/changesets:
Only once the last bullet is merged you'll be able to see (and test) changes to incremental compiler behavior.
Targeted sbt version
At the moment we are targeting shipping improved incremental compiler with sbt 0.13.2. It's realistic we can do that but obviously there's no commitment on our side that we'll make it. Plans can always change.
Why would I care?
If you have large enough Scala project of certain (quite common) structure then you might suffer from the problem that sbt's incremental compiler recompiles too much when you modify your project. A good example are Play projects. Here's comparison of incremental compiler behavior in different sbt versions for some sample Play project and typical code modification scenarios. As you can see, in some cases the improvement can be quite dramatic.
NOTE: Once name hashing is merged not only sbt will benefit. Zinc will see the same improvements. Scala IDE (Eclipse plugin) and IntelliJ embed zinc so they will have better incremental compilation as well.
What's the basic idea?
I wrote some documentation that explains current incremental compiler design and challenges related to incremental compilation in Scala. There's also a chapter that explains the basic idea behind the name hashing algorithm.
Awesome work y'all!
On Tuesday, January 7, 2014, Grzegorz Kossakowski wrote:
It'll work in 2.10, though some corner cases could only be fixed in 2.11
On Monday, April 21, 2014, Ben McCann email@example.com wrote:
Specifically, incremental compilation (including name hashing) can be ruined by bugs in Scala compiler. If Scala compiler reports to incremental compiler with unstable names (e.g. for existential types) then you'll get spurious recompilations. We've seen number of such examples and such bugs were fixed during Scala 2.11 development.
Your best combo these days is: naming hashing turned + Scala 2.11.