On Mar 26, 2011, at 20:08, Joar Wingfors wrote: If you have a reproducible way to make our indexer malfunction, we'd love to hear about it via the Apple Bug Reporter:
<http://developer.apple.com/bugreporter/>
Thanks!
j o a r
I think I have my failure sort of figured out, finally. To recap, there were two problems:
1. Indexing and syntax coloring stopped working. When I turned off the 'recursive' flag for a header search path, indexing and syntax coloring started working again. This was similar to Eduardo's problem but not, I suspect, the exact same problem.
2. In order to get at the scattered header files that the recursive path was finding for me, I had to reconfigure the project's imports. The result of that reconfiguration (which used framework PrivateHeaders directories) caused in-editor compiler error messages to stop appearing, just for that one project. (A second project in the same workspace, the one that built the frameworks, worked fine. I later found that the problem could actually be specific to particular files in the main project.)
It turns out that there are some #import paths that are invalid to the indexer(? editor? live compiler?), but which are valid for the LLVM compiler. These invalid paths seem to stop the in-editor error messages dead, even though the project builds fine. There are no error messages or issues about the paths, nor anything I could see in the console log.
The relevant imports in this case were all of the form:
#import <FrameworkName/includeFile.h>
where 'includeFile.h' didn't actually exist at that location relative to any build settings root path, but was in the framework's PrivateHeaders directory. In addition, the above had to be included indirectly -- it didn't fail if placed in the '.m' file directly or even in a directly imported '.h' file, though I did find a case where a '.h' file imported by a '.h' file seemed to trigger the problem. In my case, the indirection came (apparently) from putting several of these framework includes in the '.pch' file. Well, that's my speculation, anyway.
I don't know why #imports of this form even compile, but I guess the compiler is finding the headers relative to the framework. I *think* this is the correct way to get at frameworks headers***, but I'm not sure.
The link between Eduardo's problem and both of my problems seems to be that they all involve imported files not being found (incorrectly) by the indexer.
My workaround was to take out everything that I'd added to the '.pch' file, and #import everything explicitly in each compilation where needed.
A stripped down version of the main project, showing one example of the problem, was appended to 9193750, if anyone at Apple is interested.
*** I googled on how to set up the PrivateHeaders files, and found an old comment somewhere from Chris Hanson saying this was what you were supposed to do when embedding private frameworks, so I did it. :)
|