Summary: | Incremental Compilation Problem on Reweavable | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Ron Bodkin <rbodkin+LISTS> | ||||
Component: | Compiler | Assignee: | Andrew Clement <aclement> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P2 | ||||||
Version: | 1.5.0M2 | ||||||
Target Milestone: | 1.5.0RC1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Ron Bodkin
2005-04-29 14:53:08 EDT
The following steps reproduce this problem reliably for me. Add a static inner aspect to some type: class MyTestCase extends TestCase { ... static aspect Monitor { before() : cflow(pc1()) && pc2() {} } } If I comment out the aspect and save, I get lots of messages like this: 2 type com.crankj.monitor.resource.TestCase$Monitor is needed by reweavable type <Type> Hmm - I know *exactly* why this error occurs... This is still a problem in the latest versions... Created attachment 30388 [details]
testcase patch
Patch containing a MultiProjectIncrementalTest which simulates the steps Ron describes to recreate the problem. It needs an aspect A which applies to a class C1 and then another aspect Monitor within the same file as a class C2 which also applies to C1. C2.java is then deleted and replaced with C2.aj.
In the case where C2.aj is the same as C2.java but with the Monitor aspect commented out (MultiProjectIncrementalTest.testPr93310_1()) the following error is reported:
Build errors:
error at package pack;
^^^^^^^^^^^^^
C:\temp\ajcSandbox\ajcTest40937.tmp\PR93310_1\src\pack\C1.java:0::0 type pack.Monitor is needed by reweavable type pack.C1
---------
In the case where C2.aj is exactly the same as C2.java (MultiProjectIncrementalTest.testPr93310_2()), then the following error is reported:
Build errors:
error at (no source information available)
C:\temp\ajcSandbox\ajcTest203.tmp\PR93310_2\src\pack\C1.java:0::0 aspect 'pack.Monitor' woven into 'pack.C1' must be declared in an aop.xml file.
---------
Apply this patch to the tests project.
test patch checked in - commented out. hoping adrians changes about to go in might fix this ... fixed by my changes for another incremental bug ;) Yey! testcases are now passing. fix available. |