Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] incrimental compilation

Nick,

Wes gives some great pointers below.  I'm wondering if there's something
fundamental about your build process that prevents you from keeping the Ant
script running in order to use the incremental building.  Making iajc behave
more similarly to javac might be possible if we externalized the last
compile's dependency structure and some other state currently kept
in-memory.  I can't recall us considering that, and it could be a fair
amount of work.  So we need to better understand the limitations the current
modes impose.  I imagine that you're not the only one affected by
difficulties in substituting ajc for javac, so please keep us informed of
your experiences.

Thanks,

Mik

> -----Original Message-----
> From: aspectj-dev-admin@xxxxxxxxxxx [mailto:aspectj-dev-admin@xxxxxxxxxxx]
> On Behalf Of Wes Isberg
> Sent: Thursday, January 15, 2004 6:50 PM
> To: aspectj-dev@xxxxxxxxxxx
> Subject: Re: [aspectj-dev] incrimental compilation
> 
> Faster compiles, from incremental builds or ...
> 
> Maybe use -outjar to output the incremental compile.  Then
> whenever that jar file is updated, run the subsequent builds.
> 
> Or, AjcTask.doCompletionTasks() uses ajc.Main.setCompletionRunner()
> to get notice of completion, so you could do something similar
> with your own ajc.Main.main(..) driver outside of Ant.
> 
> And in either case you can define a message handler so they go
> to you rather than System.[out|err].
> 
> Perhaps more importantly, look at your pointcuts and such to
> see if you are asking the compiler to to unnecessary work.
> Try (when correct) to use && within() or && withincode() to provide
> a fastmatch to avoid munging where it is not needed. For
> more information on that, see section 7 in Erik/Jim's paper
> 
>    http://hugunin.net/papers/aosd-2004-fixedSubmission.pdf
> 
> A more modular build - compile each module, compile aspects to
> binary, weave each module - might also help.
> 
> Performance is one aim of 1.2, so relief is on the horizon,
> but AFAIK there are no huge performance optimizations in
> the tree now.
> 
> Wes
> 
> Nicholas Lesiecki wrote:
> 
> > Ok, admittedly iajc will not (in 1.1) behave like javac.
> >
> > Does anyone have any good examples of how to recreate the desired
> behavior
> > (fast compiles)? In other words, do you launch one ant script and leave
> it
> > idling while launching another to do post-processing, packaging, and
> > deployment? How does the second script know when the first is done with
> an
> > incremental compile? Has anyone done this and relied upon it for their
> main
> > build?
> >
> > The reason I'm asking: VMS (my company) just introduced AspectJ to the
> > project this week and the main complaint is slow incremental compiles
> during
> > the compile-deploy-test cycle.
> >
> > If we manage to figure it out before someone assists, I'll post the
> solution
> > here.
> >
> > Cheers,
> > Nick
> >
> > On 1/15/04 1:56 PM, "Wes Isberg" <wes@xxxxxxxxxxxxxx> wrote:
> >
> >
> >>The AspectJ compiler does not support a mode like the
> >>Javac Ant task where the set of input files are pruned to
> >>remove files that haven't changed since a corresponding
> >>.class file changed.  That can produce incorrect file
> >>sets even for Javac, and AspectJ always needs to know
> >>precisely which files it is supposed to be compiling,
> >>since aspects potentially affect any class.  (This is
> >>covered in the AspectJ FAQ.)
> >>
> >>You have another option:  Use the Ant task "tagfile" option,
> >>and modify the tagfile whenever you want to kick off another
> >>incremental build.  This will leave the compiler
> >>"idling", but that's the only way to make us of
> >>the in-memory cache for incremental compilation.
> >>
> >>See the ant task docs for more details.
> >>
> >>http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-
> home/doc/devgu
> >>ide/antTasks.html
> >>
> >>Wes
> >>
> >>Peter Litvak wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>
> >>>
> >>>Is there any way to get an incremental compilation with AspectJ
> compiler
> >>>using ANT task? The incremental mode that described in the
> documentation is
> >>>not what I need. In that mode you have to run your build script and
> then
> >>>after full compilation is done the compiler is sitting there and
> waiting
> >>>until you press 'r' to rebuild (then it rebuilds only changed files) or
> 'q'
> >>>to quit. This is so called "online" mode. Where I need an "offline"
> mode
> >>>because I use ANT build script from an IDE other than Eclipse and I
> cannot
> >>>have the compiler to idle.
> >>>
> >>>Basically I want to make AspectJ Ant task to behave pretty much like
> regular
> >>>javac task.
> >>>
> >>>
> >>>
> >>>Any suggestions?
> >>>
> >>>Thank you,
> >>>Peter
> >>
> >>_______________________________________________
> >>aspectj-dev mailing list
> >>aspectj-dev@xxxxxxxxxxx
> >>http://dev.eclipse.org/mailman/listinfo/aspectj-dev
> >
> >
> 
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev



Back to the top