This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add server capability advertising hot-reloading of CDBs.
ClosedPublic

Authored by sammccall on Jan 7 2021, 2:40 AM.

Details

Summary

Currently some clients watch for CDB changes and restart clangd, now that we
can reload compile_commands.json ourselves this is counterproductive.
The capability allows this behavior to be phased out.

This is going to be a mild regression, as we do not actually watch for files on
disk and so new diagnostics need to wait until a rebuild is requested e.g. due
to file change (and the internal caches have expired).
However this is still a better tradeoff (and if it's important, we can request
the client to watch files for us in the future).

Diff Detail

Event Timeline

sammccall created this revision.Jan 7 2021, 2:40 AM
sammccall requested review of this revision.Jan 7 2021, 2:40 AM
kadircet accepted this revision.Jan 7 2021, 3:59 AM
This revision is now accepted and ready to land.Jan 7 2021, 3:59 AM