Bug 137634

Summary: CompilationParticipant not correctly recording new dependencies
Product: [Eclipse Project] JDT Reporter: Tim Hanson <thanson>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jgarms
Version: 3.2   
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch to ReferenceCollection.addDependencies() none

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)