Hi Benjamin,
On Wed, Sep 12, 2012 at 12:09 AM, Benjamin Manes <ben.ma...@gmail.com>wrote:
> I'm working on a pull request <
https://github.com/gradle/gradle/pull/99>to Gradle for improving the generated Eclipse metadata so that it works
> properly with ScalaIDE. It would be useful if a ScalaIDE developer could
> chime in on the pull request and provide some feedback on the direction
> that we're headed.
This is really great news!
> In Gradle v1.1 the generated metadata adds the Scala nature, but does not
> add the ScalaIDE's classpath container. This results in the error 'Cannot
> find Scala library on the classpath. Verify your build path!' as described
> in your FAQ. The pull request resolves this issue so that an import occurs
> cleanly, however it results in two versions of the Scala library on the
> build path (gradle's dependency and ScalaIDE's reference library). There is
> concern that having having two conflicting versions of scala-library on
> the IDE's build path is unhealthy, but it does appear to work properly for
> minor library version (as binary compatible).
Indeed. Sbteclipse uses only the classpath container and removes the scala
library from project dependencies. IMO this is the preferred way, but
having both libraries (as long as they have the same major version number)
does/should not hurt.
> A side effect of having the scala-library as a gradle dependency is that
> it disables ScalaIDE's incremental compilation support, which falls back to
> the slower full compile.
This should not happen. Are you sure? I'd be happy to investigate this if
you have a test project somewhere. The Scala library is not treated
specially by the Eclipse builder. One possible explanation is that the
library is re-downloaded or somehow looks like it changed, and that causes
the builder to rebuild the whole project. If you use a recent nightly you
can enable DEBUG logging (Preferences/Scala/Logging) and see what exactly
is changed and what is recompiled.
iulian
> One solution to this is have gradle remove the library dependency so that
> ScalaIDE's reference library is the only version on the build path. This
> would allow incremental compilation and avoid versioning surprises, but may
> create subtle behavioral differences due to bug fixes (e.g. when running
> from Eclipse vs. command-line). Alternatively, it naively seems that that
> the ScalaIDE should prefer the build system's version of the dependency and
> not include its own as the reference library.
> What do the ScalaIDE developers expect to be in the Eclipse metadata that
> a build system generates?
> Thanks!
> Ben
> [1] https://github.com/gradle/gradle/pull/99
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais