Automatic update of YouCompleteMe
How to keep YouCompleteMe functional and updated after breaking system updates (of course, if YCM is itself stable).
Two annoyances may happen with compact YouCompleteMe deployment when a system gets updated:
ycmdincompatibility withlibclang,boostor anything else- system include paths change (mind
libstdc++).
In the first case the plugin wouldn’t load at all, it’s easily noticeable. But in the second case some functions are completed, but not standard C++. I’ve just realized that YCM could be updated with the system too as soon as incompatibility is detected.
Two commits (first, second) implement the following:
- The script
ycm-check.shto check whether all the system include directories are still accessible in the file system, and to check whetherycm_core.solinks properly. - The script
ycm-update.shto update the plugin and include directories forycm_extra_conf.py. - The script
yaourtto hook into system update request.
Now every time I type yaourt -Syua, the system checks whether YouCompleteMe
needs be updated, and does the update automatically.