Bug 109040

Summary: Incremental compilation does not build using reweavable
Product: [Tools] AspectJ Reporter: David Knibb <dknibb>
Component: CompilerAssignee: Andrew Clement <aclement>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: 1.5.0RC1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description David Knibb CLA 2005-09-08 06:44:57 EDT
I have an AspectJ plugin project which has the reweavable flag set under the 
AspectJ Compiler -> Advanced options. If  I edit a file (so trigger incremental 
build) and run the project, I get an error claiming that the project "is 
already woven and has not been built with -Xreweavable" (I am also using ltw).

Doing a full build resolves this.

Unfortunately, this bug can be quite hard to reproduce...
Comment 1 Adrian Colyer CLA 2005-10-28 07:08:53 EDT
andy will try to reproduce this...
Comment 2 Andrew Clement CLA 2005-11-28 08:20:21 EST
I dont think this can go wrong anymore .... Xreweavable is the default now and users are LTWing ... but I'll try to recreate.
Comment 3 Andrew Clement CLA 2005-11-28 10:51:13 EST
I cant get this to fail as described - I think making reweavable default and improvements to LTW have resolved it.

I tried:

Create project P1, an AspectJ project.  In it, I have a class and an aspect that affects this class.  It compiles and runs fine.

Create project P2, an AspectJ project.  In it, I have an aspect that would affect the class in P1 if it was woven with it.

I then create a LTW profile for project P1 that has P2 on its aspectpath - when this runs we fail.  The error is that the aspect from P1 isnt 'declared' and so the class in P1 can't be rewoven - this is a sensible error and may well be what David was encountering but previously we just failed in a horrid way rather than like this.  I then added P1 to the aspectpath so that the aspect from P1 can be found at LTW time - we then run successfully with both aspects affecting the class.

magic!

I'll close this, we can reopen if someone else hits it...