Bug 137634 - CompilationParticipant not correctly recording new dependencies
Summary: CompilationParticipant not correctly recording new dependencies
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-19 20:16 EDT by Tim Hanson CLA
Modified: 2006-04-28 14:58 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch to ReferenceCollection.addDependencies() (2.55 KB, patch)
2006-04-19 20:29 EDT, Tim Hanson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hanson CLA 2006-04-19 20:16:01 EDT
To repro enable the test inside org.eclipse.jdt.apt.tests.APTBuilderTests. Rename _testExtraDependencies to testExtraDependencies.

On line 285, a full build is performed. At this point the type p1.p2.p3.p4.A registers a dependency on p1.p2.p3.p4.C. This happens through the CompilationParticipantResult.

Then a structural change to C is made and on line 292 an incremental build is performed. It is expected that A would be recompiled, but it is not.

It is my belief that the problem is in ReferenceCollection.addDependencies(). It does not add a simpleNameReference for "C", it only adds the qualifiedNameReferences.
Comment 1 Tim Hanson CLA 2006-04-19 20:29:57 EDT
Created attachment 38997 [details]
Proposed patch to ReferenceCollection.addDependencies()

This adds in all simple names that do not already exist.
Comment 2 Philipe Mulet CLA 2006-04-21 09:28:43 EDT
+1 for 3.2RC2
Comment 3 Kent Johnson CLA 2006-04-21 13:34:01 EDT
Released patch

Tim, please enable your APT test.

thx
Comment 4 Tim Hanson CLA 2006-04-21 13:56:01 EDT
I enabled the test.
Comment 5 Olivier Thomann CLA 2006-04-28 14:58:03 EDT
Verified with I20060427-1600 for 3.2RC2 (since all regression tests passed)