Bug 167875

Summary: build path excludes only partially effective
Product: [Eclipse Project] JDT Reporter: Art Dyer <art.dyer>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2.1   
Target Milestone: 3.2.2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Two projects illustrating comment 0 scenario none

Description Art Dyer CLA 2006-12-13 11:34:06 EST
Build ID: M20060921-0945

Steps To Reproduce:
This is a change in behavior versus 3.1 (build ID I20050627-1435).  It may be a duplicate of, or related to, Bug ID 105631, although that one and other build-path bugs that I found when searching are about PDE while this one is not.

Given a workspace with two projects:

Project Foo depends upon project Bar.  Project Bar contains class bar.Bar with methods one() and two().  Project Foo also contains a folder "bar" with a legacy version of bar.Bar that has method three() but not one() or two().  (I.e., that folder started out as a package within project Foo but was then excluded from Foo's build path when bar was moved into its own project).

In 3.1, all is well.  Project Foo uses the definition of bar.Bar from dependent project Bar.  The excluded folder does not seem to influence anything.  Classes in Foo can call Bar.one() and Bar.two() but not Bar.three().

In 3.2, a build error reports that one() and two() are not defined for class Bar, as though the folder within project Foo is still being used in the build path despite being excluded.  Yet, if you edit a class in project Foo, type "Bar." and hit Ctrl-SPACE, the completion list contains one() and two() (from dependent project Bar) but not three() (from the excluded folder).  If you select one of those completions, you'll get an error on the call.

Apparently the completion feature and the compiler are using two different sources of information for the members of class bar.Bar.

More information:
I will make a workspace with the projects described above available by anonymous FTP as ftp://ftp.newmonics.com/pub/EclipseBug<THIS BUG ID>.tar.gz.

In the tar will be two top-level directories:  workspace-3.1 is the workspace as it was created by 3.1; workspace-3.2.1 is what it was like after running 3.2.1 on the original.
Comment 1 Frederic Fusier CLA 2007-06-20 04:45:52 EDT
Created attachment 71851 [details]
Two projects illustrating comment 0 scenario
Comment 2 Frederic Fusier CLA 2007-06-20 04:46:11 EDT
I cannot reproduce this issue neither using 3.2.2 nor 3.3 RC4.