Rip-Rip/clang_complete — Issue #125: multiple .clang_complete file problems
Author: neybis
Created: 2012-02-09 14:50:55+00:00
State: open

I have been able to duplicate this issue on a consistent basis at work with a very large code base. I have yet to try this out with a test application for you guys (and if I have time I may try to look into this myself).

I will lay out the problem first and then what I had to do to correct the completion issue:

Failure case:
I have a subversion checkout in a folder called '~/svn/checkout'. There is not a .clang_complete file in this folder. This project has multiple make files for each project in the check (i.e. ~/svn/checkout/proj_1 ~/svn/checkout/proj_2). Each of these has a src and inc folder but all projects rely on includes from others. I have first tried putting .clang_complete files in the proj_n/src folder since I only need code completion in the cpp files but thought that may be causing issues so I moved the file up a directory to the root of the project ( ~/svn/checkout/proj_n).

The code completion succeeds but seems as if its using a cache of some sorts. When information is changed in header files the changes are not reflected in the code completion.

Successful case:
Rename all .clang_complete files to something arbitrary so clang_complete won't pick it up (I used .clang_complete.broken). Now if I'm trying to code complete in say proj_2, if I copy its .clang_complete file to the ~/svn/checkout/ folder it grabs the new changes.

Any reason why this would be? It doesn't seem to make any sense and may be a user error on my part but it really seems like it should work from the ~/svn/checkout/proj_n folder as all of my -I arguments in the .clang_complete file use absolute pathing. I will try to get a test case that I can give you guys since the source code im working with is not open source.