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

why do not compatible FlagsForFile in .ycm_extra_conf.py #3512

Closed
haolongzhangm opened this issue Oct 25, 2019 · 8 comments
Closed

why do not compatible FlagsForFile in .ycm_extra_conf.py #3512

haolongzhangm opened this issue Oct 25, 2019 · 8 comments

Comments

@haolongzhangm
Copy link

after update ycm repo, find need chang FlagsForFile to Settings
why do not compatible?

@puremourning
Copy link
Member

Please see CONTRIBUTING.md. You should lot need to change anything. Please provide diagnostics.

@haolongzhangm
Copy link
Author

@puremourning if I do not change FlagsForFile to Settings
use YcmCompleter GoToDefinition will failed: RuntimeError: Cannot jump to location

more detail:

old ycm@afd69b382844315812fd48912eaa9fa47cba3a8d
all work fine

update ycm with command:
git pull --rebase
git submodule update --init --recursive
python3 install.py --clang-completer

then same project, so many symbol will return err: : RuntimeError: Cannot jump to location

then i moidy :

diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py
index 37f9395..bce97ec 100644
--- a/.ycm_extra_conf.py
+++ b/.ycm_extra_conf.py
@@ -112,7 +112,7 @@ def GetCompilationInfoForFile( filename ):

This is the entry point; this function is called by ycmd to produce flags for

a file.

-def FlagsForFile( filename, **kwargs ):
+def Settings( filename, **kwargs ):
if database:

will be ok

@bstaletic
Copy link
Collaborator

FlagsForFile has been deprecated for a long time. The new clangd completer supports only Settings. FlagsForFile became limiting for us and so Settings was made that can do a lot more.

@haolongzhangm
Copy link
Author

the issue commit at : 123f0c0

@bstaletic
Copy link
Collaborator

No, it is not. That commit is very much unrelated to C++ flag handling. Clangd completer required Settings from the start.

@haolongzhangm
Copy link
Author

@bstaletic
i build with --clang-completer not clangd

@haolongzhangm
Copy link
Author

@bstaletic
Consider the this scenario:
a project, as history, so many Developers use old ycm, so .ycm_extra_conf.py use FlagsForFile by default, I need modify to Settings at local,

the better way is make it compatible both for compatible or Settings?

@bstaletic
Copy link
Collaborator

The old completer still supports FlagsForFile, but you haven't posted the information requested by the issue template.
Please see CONTRIBUTING.md, user support is not what github issue tracker is for.

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

No branches or pull requests

3 participants