| Summary: | Indexer refresh and rebuild are not working properly with Symbols from C/C++ CDT Paths and Symbols | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | J Gagnon <jgagnon> | ||||
| Component: | cdt-core | Assignee: | Project Inbox <cdt-core-inbox> | ||||
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, malaperle, remy.suen, yevshif | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
J Gagnon
This seems to be a problem with the C/C++ tooling. These bugs go to CDT, not the Platform. I have multiple build configurations that primarily differ by the values of several Symbols in the "Symbols and Paths" section. These symbols are used as global switches to include/exclude code blocks. The indexer does not pick up the change of configuration so it does not index code it should index and does index code it shouldn't. I further investigated after my most recent delete and rebuild of .metadata by re-adding only one of the configurations and manually changing the values and auto-rebuilding. This also did not work. I then tried a manual forced rebuild and that did not work. It is possible that the other issue is a symptom of this first issue since several of my include chains have dependancies upon the globally defined symbols. Thanks for the recategorization Remy, this is my first bug add for Eclipse and I couldn't find "CDT" or "indexer" in the drop-downs. I have confirmed that the secondary issue is a result of the first issue. In other words, the core problem is that the Symbol changes from Paths and Symbols are not being used by the indexer in neither refresh nor rebuild. (In reply to comment #3) > I have confirmed that the secondary issue is a result of the first issue. > In other words, the core problem is that the Symbol changes from Paths and > Symbols are not being used by the indexer in neither refresh nor rebuild. Typically the indexer is bound to a single configuration. This can be configured via the indexer preferences and the indexer project properties. Please check how your configuration looks like. (In reply to comment #4) > (In reply to comment #3) > > I have confirmed that the secondary issue is a result of the first issue. > > In other words, the core problem is that the Symbol changes from Paths and > > Symbols are not being used by the indexer in neither refresh nor rebuild. > > Typically the indexer is bound to a single configuration. This can be > configured via the indexer preferences and the indexer project properties. > Please check how your configuration looks like. Sorry for the slow reply, the email notifying me of your comment/query was filtered. I've ensured that won't happen next time. As I mentioned in the description, I have verified the contents of the configuration. Originally I had a separate configuration for each different set of values. When I deleted the .metadata directory for the second time I only entered one configuration as an attempted workaround but it was not successful. Currently, it isn't even recognizing that ANY of the Symbols have been defined (ie failing an #ifdef check) nevermind any of the changes I make to them (ie failing an #if PLATFORM_C6455 == 1 check). For problem 1) did you try this preference? In project properties, C/C++ General, Indexer, "Build configuration for the indexer" set it to "Use active build configuration". Could you provide a sample project where this happens? I have never deleted my .metadata files and I use 3 configurations with very different symbols. The worse I had to do is Refresh then rebuild the index (by right-clicking on project, Index, Rebuild). I have tried both "Use active build configuration" and the other option, neither had any effect. Also, this option should no longer be relevant now that I have only one configuration. Unfortunately I can't provide a copy of the project (NDA) but since I have this problem even with a completely new workspace and project from the "import c/c++ as a makefile project" I am dubious that it would be useful. I did notice that I was unable to import my configurations; I had exported them previously but when I tried to import them the dialog box closed without comment and nothing visible happened. Created attachment 203309 [details]
This exported symbols file would not import properly when rebuilding my workspace from scratch
I erased the workspace and restarted again but this time I manually reentered the key symbols rather than trying to import them and suddenly the indexer is working again. This strongly suggests that there was a problem with importing the exported symbols file so I have attached an NDA-safe version of the suspect exported symbols file that I mentioned in the previous comment. (In reply to comment #9) Importing the attached file works for me. Do you see any errors in the log (<workspace>/.metadata/.log)? |