Indexing issues
Indexing issues
- Subject: Indexing issues
- From: Andreas Grosam <email@hidden>
- Date: Mon, 22 Dec 2003 15:29:52 +0100
Hi All,
I experienced an issue with indexing in XCode. This is not a new issue,
but - in fact - i noticed several issues since the early
ProjectBuilder.
The current issue is, that XCode indexing will not locate the headers -
and thus, the symbols defined there, in the same place as the
compiler. For instance, when creating a project from the C++ Tool
template, and including C++ headers like <vector> <iostream> etc. In
this case, indexing will erroneous locate the headers (and symbols
defined there) in the folder /darwin/3.1 -- instead of the correct
folder darwin/3.3.
Well, I'm not interested in discussing and finding out the *bug*
leading to this issue (only Apple can fix it), but IMO the following
question is much more interesting:
how can it be, that indexing finds headers in different places than the
compiler when building the project??
Well, for me - it is unclear how indexing determines the search paths
for finding project related files and as well which file is considered
to be a project file at all - means, is a candidate file being parsed
by the compiler during a build.
Of course, indexing should use an algorithm in order to determine the
search paths which yields the same search paths the compiler would find
during building the project.
The search paths which will be used during building by the compiler
depend on several build settings - e.g. the list of include paths, some
compiler options ("nostdinc" flag) and the compiler itself when
choosing system headers (implicit include paths).
Even more, the files (mostly headers) which will be included when
compiling a source file, may depend on conditional compilation macros,
too.
So, having this said - we might conclude that the only instance knowing
what file is used and where to locate it - is the compiler itself.
Otherwise, indexing would need to invoke the preprocessor, would need
to know all macros defined through the command-line when invoking the
preprocessor, would need to know compiler options affecting implicit
include paths, would need to know compiler specific algorithm for
including system headers, etc. - would need to be a full C++ parser
itself.
IMO, this is a real challange (but not impossible!).
So my question is, will it be ever reliable to have such an extra
indexing method used in XCode??
Wouldn't it be better to use the compiler itself to create the "symbol
list"?? Which effort would be required to modify the compiler just
issuing a "symbol list" output??
Regards
Andreas Grosam
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.