On Thu, Apr 1, 2010 at 8:15 PM, Jesse Eichar <[email protected]>wrote:

> You are correct of course.  There is a scala compiler plugin that allows
> you access to the entire dependency graph so if you have the changed files
> you can detect all the affected files.  SBT does a great job of this.  I was
> considering at some point doing this work (when it can fit into my schedule
> of course).  I wanted to ensure that I will have the tools required for
> this.
>
>
Gradle offers something like this as well already. I should say Ant is
offering this via the Ant depend task which is used by Gradle. It works the
same way as SBT by analyzing the source. It is enabled by default. See:
http://gradle.org/0.9-preview-1/docs/groovydoc/org/gradle/api/tasks/compile/DependOptions.html

It has a couple of drawbacks. It does not use the information from the
incremental build but checks for changes again. It does not work across
subprojects.

A general drawback is that the source analysis is not as reliable as other
forms of analysis could be. We plan to tackle this properly at a not too
distant point and we also have some prototypes. But we think their are more
important other issues that in average provide much higher gains regarding
performance (e.g. parallel test execution).

- Hans

--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz



>
>
> On Thu, Apr 1, 2010 at 5:38 PM, John Murph <[email protected]> wrote:
>
>> I think you are basically correct.  For the use case you are considering,
>> however, there are complications.  You would not need to compile only the
>> changed file, but all dependent files.  For instance, if the change was to
>> delete a method from a class, and another source file used that method it
>> would need to be recompiled (which might generate a compile error).
>> Handling compilation dependencies is something that Gradle wants to improve,
>> but it's a significant effort so it might be a while yet.
>>
>> Hope this helps,
>> --
>> John Murph
>> Automated Logic Research Team
>>
>
>

Reply via email to