scala-ide/scala-ide — pull request #621 by gkossakowski (2014-01-13 22:36:45+00:00)
Title: Add support for IncOptions.{nameHashing, recompileOnMacroDef} flags

Add support for new incremental compiler options introduced in
sbt 0.13.2-M1:

* `nameHashing` that enables new (experimental) incremental compilation
algorithm
* `recompileOnMacroDef` that controls the behavior of a heuristic
that takes care of invalidating of source files that depend on
macros

Those two options are directly exposed as IDE project settings.

Since those options are available in 0.13.2-M1 only, we bump sbt dependency
to that version.

Other than that, I've made two small refactorings:

1. We don't call `IncOptions.copy` anymore but use with* copying methods
instead. The reason is that we've made IncOptions to be not a case
class which makes it easier to maintain binary compatibility of
IncOptions' API. Generally speaking, default arguments in Scala are
not compatible with the goal of maintaining binary compatibility.
2. We've switched to a new, overloaded variant of `IC.readAnalysis` that
takes IncOptions as an argument. The new variant returns the right
variant of analysis in both cases when name hashing is enabled or
disabled.

Despite the fact that we switched to the correct variant of
`IC.readAnalysis` method a restart of IDE is required after changing the
value of nameHashing flag. Normally, one would expect that cleaning given
project is enough (that's how it works in sbt itself). However, for some
reason it doesn't work in IDE. I believe that some Analysis cache is not
cleared correctly when the project is being cleaned. I couldn't figure out
the root cause of the problem so for now, a restart of IDE is necessary.