Bug 158940 - Warning about invalid project path
Summary: Warning about invalid project path
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P3 minor with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-27 05:12 EDT by Michael Stather CLA
Modified: 2020-09-04 15:23 EDT (History)
9 users (show)

See Also:


Attachments
Remove the check for duplicate path entries. (1.35 KB, patch)
2009-05-21 11:07 EDT, Glen Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stather CLA 2006-09-27 05:12:39 EDT
When I set up a C project, after building it twice I always get a warning "invalid project path. duplicate path entries". When I clean the project it goes away but after the second build it´s there again.
Comment 1 Tim Kelly CLA 2007-12-18 12:23:50 EST
Hi - Can someone suggest why CDT needs to keep these "Invalid Project Path: Duplicate path entry" messages around? Specifically they are emitted under:

org.eclipse.cdt.internal.core.model.PathEntryUtil#validatePathEntry(ICProject cProject, IPathEntry[] entries).

This has apparently confused users in the past:

http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg14370.html
http://discussion.forum.nokia.com/forum/showthread.php?t=107613

and another user just reported:

"There is no indication on what the warning is exactly about. Lately I spent 30
mins trying to figure out which exactly path is duplicated and where these
duplicates are. Then failed and ignored the warning."

Can we either get rid of these warnings or be a bit more specific about where the problem occurs and how to fix it? For our use, they are useless because our build system will emit the same warnings. Obviously in shops where users cannot check in code with warnings this can be a big time waster.
Comment 2 Tim Kelly CLA 2008-01-08 15:05:56 EST
You can make your own default settings for the Problems View, Filter dialog. I added a setting to filter out the Path Entry Problems, like so:

org.eclipse.ui.ide/PROBLEMS_FILTERS=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<filters>\r\n<filter IMemento.internal.id\="Default" contains\="true" description\="" enabled\="true" onResource\="3" selectBySeverity\="false" selectionStatus\="org.eclipse.cdt.core.pathentry_problem\:false\:" severity\="0"/>\r\n</filters>
Comment 3 Kenneth Evans, Jr. CLA 2008-03-24 14:09:34 EDT
So why can't this be fixed?  I've just wasted an hour or so myself.  I don't like to filter problems, and that seems to be the only to avoid seeing the [invalid] warning.

Thanks,
Comment 4 Michael Berger CLA 2009-02-04 15:02:30 EST
Is the bug still in the current build of CDT, and if so, can you specify the version of eclipse and CDT used?
Comment 5 Kenneth Evans, Jr. CLA 2009-02-04 17:51:50 EST
I still have the problem with Eclipse 3.4.1 and CDT 5.0.1.  From the Problems view:

Description	Resource	Path	Location	Type
Invalid project path: Duplicate path entries.	Checkerboard		pathentry	Path Entry Problem

Is there some way to fix it?

Thanks,

Ken
Comment 6 Kenneth Evans, Jr. CLA 2009-02-12 15:12:05 EST
Bug #117013 (from 2005) seems to be related.
Comment 7 Glen Anderson CLA 2009-05-21 11:07:09 EDT
Created attachment 136660 [details]
Remove the check for duplicate path entries.

I've recently run into (I think) this same issue while implementing scanner discovery for my tool chain.  In my case I have two tools, a compiler and an assembler, that each have their own built in macros. Some of these macros, however, are the same for both tools (i.e. __PRODUCTVERSION__=1234). When validating the resolved path entries the PathEntryManager seems to lump them all into one list and then complains that they are duplicates even though they apply to two completely different inputTypes.  This results in a case where a user sees an alarming warning that they can do nothing about and that has no adverse impact on their project.

Given the comments above does it perhaps makes sense to remove these warnings? I can't see how they're terribly useful given that there's nothing that the user can do about them.  

Assuming that there is some agreement here I've attached a proposed patch that removes these warnings from the latest trunk (as of 6.0 RC1 anyway). If there is some good reason for this warning could someone maybe help educate the rest of us?
Comment 8 Andrew Gvozdev CLA 2009-05-24 23:16:10 EDT
Wouldn't it be the better way to take in consideration a tool and emit warnings only if the duplicates belong to the same tool? Additionally, "Duplicate path entry" warning could be made less cryptic and actually useful by specifying exact "path" in question.
Comment 9 Chris Recoskie CLA 2009-05-28 13:51:16 EDT
I agree it should be fixed, but this is minor.

Removing the check is not the right thing to do though.
Comment 10 Kenneth Evans, Jr. CLA 2009-12-30 11:40:57 EST
It is still happening in Eclipse 3.5.1 and CDT 6.0.0.  It is really annoying and has apparently caused many people (including myself) much time.  There are many Google hits on this problem. It is _not_ minor, and it is probably not that hard to fix or at least to post a workaround.  I do not understand why it is being ignored.

It is now saying:

Invalid project path: Duplicate path entries found
 (/Checkerboard [Include path] isSystemInclude:true includePath:C:/Cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++), path: [/Checkerboard].

That is more information, but doesn't tell me enough to fix it or even understand what is causing it.

For the record: I got rid of this last occurrence by deleting the warning in the Problems view.  It hasn't appeared after three cleans and rebuilds.  However, I have got rid of it before, and it has eventually returned time after time.
Comment 11 Andrew Gvozdev CLA 2009-12-30 13:53:31 EST
(In reply to comment #10)
> It is now saying:
> Invalid project path: Duplicate path entries found
> (/Checkerboard [Include path] isSystemInclude:true
> includePath:C:/Cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++), path:
> [/Checkerboard].
Thanks for posting this message. I haven't seen that one yet.

> It is _not_ minor, and it is probably not that hard
> to fix or at least to post a workaround.  I do not understand why it is being ignored.
CDT is an open source project driven by community efforts. Unfortunately nobody feels this is important enough to invest their time and fix it given the difficulty of the task. I think you underestimate it but feel free to prove me wrong and post a patch. Just make sure that patch corrects the real problem and not just disables diagnostic message.
Comment 12 Gavin S CLA 2011-07-01 15:10:52 EDT
Still seeing the same problem in Indigo
Comment 13 beto green CLA 2012-10-03 16:46:04 EDT
I was getting a similar error which was due to NON unique Build directories in  
Build configurations

Highlight project. right click  and select properties
Select C/C++ Build
Select each Build configuration and check Build directory under the builder settings and make sure they are all unique / different .