YcmdCompletion icon indicating copy to clipboard operation
YcmdCompletion copied to clipboard

Handling UnknownExtraConf error correctly

Open hassec opened this issue 10 years ago • 5 comments

Right now the file .ycm_extra_conf.py needs to be specified in the server configuration file or the location needs to be whitelisted for the ycmd-server to load it.
The Server automatically searches recursivly for these conf-files and responds with an http-error 500 of type UnknownExtraConf which includes the path of the first file found.
I think we should include a popup to ask the user if the file should be loaded.

In Addition one could maybe include a command to (re)load a conf-file that lies in the current project folder to partly solve #2.

hassec avatar Jul 09 '15 19:07 hassec

Yeh, this idea is cool. But i don't understand, when we will get this type of notification. Maybe there is any documentation on this particular call?

LuckyGeck avatar Jul 10 '15 15:07 LuckyGeck

the whole UnkownExtraConf was discussed here abingham/emacs-ycmd#19. But somethingelse you could try is to play with the example client that comes with ycmd. If you comment out the Load_Extra_Conf command watch the response the server sends.
So to do this we would need to add an errorhandler to the urlopen command and catch http errors. If it's an error 500 and has the type UnkownExtraConf we promt the user and ask if file should be loaded. For every other error we just procced as usual and notify via statusbar.

Hope this helps. If not feel free to ask again :)

hassec avatar Jul 10 '15 15:07 hassec

Did you have a chance to look into this yet? If so what are your thoughts on how you would go about implementing this?

hassec avatar Jul 15 '15 12:07 hassec

Sorry, I had no time to look through this yet. I suppose, that I'll have some free time at the end of this week.

LuckyGeck avatar Jul 15 '15 12:07 LuckyGeck

Alright no Problem, I haven't had a lot of time either but I'm hoping that I might have time to try out a few things this weekend.

hassec avatar Jul 15 '15 12:07 hassec