Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Problem with incremental compiling in ajc

When I simply change the pointcut to point to a different sub-package
and tell ajc to do an incremental compile (by pressing enter, or by
touching the tagfile when I'm using ant builds), it winds up doing a
full recompile.

You changed a pointcut ... that may affect all the places that were
woven due to the previous definition of the pointcut.  We do a full
recompile as we need to ensure the places that it previously matched
no longer invoke the advice and the new places that match do invoke
the advice.  There are some optimizations we could perform by
analysing the pointcut to see how serious the change is but at the
moment we don't do any of that analysis - we currently spend our time
optimizing for the case where your aspects are pretty constant and you
are making changes to the affected java classes/interfaces.

Also, when I make a minor change to one of my java files that
references other types in the system (with 0 or more aspects) I wind
up getting all kinds of type not found errors.  I figured out I had to
add my destination directory to the classpath which solved the
compilation errors, but now ajc is resorting to a full build again.  A
simple file which references no types outside of its' own .java file
does an incremental compile with no problem.

You might want to raise a bug on this - I'll admit we have limited
coverage of testing of incremental compilation on the command line or
through Ant (we focus on testing incremental compilation as it runs in
AJDT) so it is possible an unexpected codepath is getting driven where
the classpath environment isn't built quite right for incremental
compilation to succeed.

Andy.


Back to the top