Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Compiling only affected sources


The compiler does emit that information, but currently the only consumer is the AJDT Event Trace view, which contains lines like this:

09:22:49         ===========================================================================================
09:22:49         build: Kind=AUTOBUILD Project=org.aspectj.lib         kind of build requested =Incremental AspectJ compilation
09:22:50         Timer event: 701ms: Time to first compiled message
09:22:50         Timer event: 791ms: Time to first woven message
09:22:50         AspectJ reports build successful, build was: INCREMENTAL
09:22:50         Timer event: 971ms: Total time spent in AJDE
09:22:50         Timer event: 10ms: Create element map (4 rels in project: org.aspectj.lib)
09:22:51         Types affected during build = 1

We could register a listener for these messages in the ANT incremental case and report them, I might take an enhancement request for that.

Part of the information stored in memory is a 'state' object representings things like what we compiled last time, blah blah - this is similar to the state recorded for JDT built projects.  The state for JDT built projects is recorded on disk as a state.dat file - this is used so that on eclipse restart it doesn't need to do a full recompile of everything.  We have an open work item to work the same in AJ/AJDT and persisting this state should enable incremental builds outside of AJDT to be done by different ANT tasks rather than one long-running one.  The problem is that this feature is currently on a long list of features...

Andy.
---
Andy Clement
AspectJ Development



"Nitzan Volman" <nitzan@xxxxxxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx

29/05/2005 16:42

Please respond to
aspectj-users@xxxxxxxxxxx

To
<aspectj-users@xxxxxxxxxxx>
cc
Subject
RE: [aspectj-users] Compiling only affected sources






My IDE does not support this, I have to use my IDEs ant integration to achieve this, (I created a "DAEMON" task, and a "compile now" task which touches rebuild.txt . ) not the most convenient way.

I think the compiler should emit some kind of summary line after each incremental compilation which includes the status of the compilation (success/failure), the time, and how many classes where recompiled.

Thoughts for the future... Can't the information currently stored in memory to achieve incremental compilations be stored on disk.
The compiler would check if such a file exists, and use this info to do an incremental recompile.


/Nitzan




-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Wes Isberg
Sent: Thursday, May 26, 2005 9:15 PM
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Compiling only affected sources


> Why can't the regular compilation behave the same way and
> copmile only whats necessary?

"What's necessary" is not easy to define, given AspectJ's semantics
(where an aspect or pointcut in a class) can affect other classes, so it can't use Javac/javac's tricks for pruning up-to-date targets. The in-process incremental support does it by keeping information in memory.  

Incremental compiles are most useful in your IDE (your boss loves it that you don't have time to get up for coffee during compiles).  Can your IDE support it?  Perhaps borrowing code from AJDT, AJDE, or iajc?

Wes

------------Original Message------------
From: "Nitzan Volman" <nitzan@xxxxxxxxxxx>
To: "Wes Isberg" <wes@xxxxxxxxxxxxxx>, aspectj-users@xxxxxxxxxxx
Date: Thu, May-26-2005 0:35 AM
Subject: RE: [aspectj-users] Compiling only affected sources Thanks Wes.

I will use this option.
Why can't the regular compilation behave the same way and copmile only whats necessary? this way is much more compilcated to use...


/Nitzan




-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Wes Isberg
Sent: Wednesday, May 25, 2005 6:02 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Compiling only affected sources


You can do incremental compilation from the command line using the keyboard or from Ant/iajc using a "tag file" which triggers a recompile when it changes:

i.e.,
- define tag file "recompile.txt"
- start Ant/iajc incremental compile
 (initial compile, classes produced; process waits)
- make changes to .java files
- when ready to recompile, touch recompile.txt
 (touch: edit, save)
- Ant/iajc process recompiles only what's necessary

iterate...

Wes

------------Original Message------------
From: "Nitzan Volman" <nitzan@xxxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Date: Wed, May-25-2005 7:47 AM
Subject: [aspectj-users] Compiling only affected sources
Hi,
I am using AspectJ 5 M2 (iajc) to compile a rather large project (~1500 classes). In a typical scenario a developer will make a minor change to a class or two - often a class that does not have any pointcuts caught by aspects in the projects. Hit the "Ant run" button, and go have a cup of coffee since the entire project is recompiled. (we do have great coffee :) ) Upon returning he might discover that he misplaced a semi-colon and will repeat the process: "Ant Run" ==> go get Coffee.  (Mental note: Switch to decaf  ) I realize that the aspectJ compiler needs to process all the input since changed aspects might affect new files,
Is there a way to speed up the compilation process anyway?
In my case, which is quite typical, most of the classes should not be recompiled even when aspects ARE changed…. The Compiler should have two stages:
The first, find out which classes should be recompiled. The second stage should recompile only those classes. The goal should be a very quick compilation when only a few classes changed… Is this possible today? thanks /Nitzan Volman



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top