Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force rescan of header files and rebuild #553

Open
nwg opened this issue Dec 21, 2019 · 3 comments
Open

Force rescan of header files and rebuild #553

nwg opened this issue Dec 21, 2019 · 3 comments

Comments

@nwg
Copy link

nwg commented Dec 21, 2019

Is there a command to force rescan of header files?

It seems if i add a #include <someheader.h> i do not get completion right away for that header. If i quit out of emacs completely and reload the file then i get completion for that header.

Likewise, if i delete the header, the completions do not go away for that header.

Is there any way to force the database to reset or rescan the header files with maybe a key binding?

I should mention i am using irony-mode with company-mode and company-irony and company-irony-c-headers

@nwg
Copy link
Author

nwg commented Dec 22, 2019

This seems to be solved for me with the flycheck-irony package, although it would be nice to have something to reload for people who do not wish to use flycheck.

@3246251196
Copy link
Contributor

I have the need to reparse sometimes too. I just set up a standard emacs timer to call irony-parse-buffer-async every few minutes iff I am in a relevant cpp/project file.

@jose-joaquim
Copy link

I came up with this problem today. I noticed this problem using this example repository.

I executed the command the echo "-I./my_inc" > .clang_complete in the project root to enable irony-mode, but it appears to not work properly. For headers in a different path (for example, "my_inc/myadd.h"), any alterations do not seem to have any effect within src/main.cpp until quitting Emacs and opening again, as the author of the topic described.

However, at least in my case, quit and open Emacs to force reload was not necessary for files in the same directory. For instance, if I'm at main.cpp (src/main.cpp) and perform some change in helper.h, this change seems to take effect right away, as it should be.

I'm using 26.3 in a macOS 10.15.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants