[PATCH] D56540: [clangd] Clean the cache of file statuses on vscode-clangd when clangd crashes.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 24 06:28:14 PST 2019
hokein marked an inline comment as done.
hokein added inline comments.
================
Comment at: clangd/clients/clangd-vscode/src/extension.ts:127
+ (fileStatus) => { status.onFileUpdated(fileStatus); });
+ } else if (newState == vscodelc.State.Stopped) {
+ // Clear all cached statuses when clangd crashes.
----------------
ilya-biryukov wrote:
> This looks scary, if we end up doing that in too many places, the code would become completely unreadable.
>
> Have no idea how to make it better, but a very general observation is that we'd be better off with dropping all the state we have when clangd crashes and starting from scratch, rather than trying to keep old components and bring them into a sensible state when crashes happen.
>
> No need to do anything right now, just something to keep in mind for the future.
Acked.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56540/new/
https://reviews.llvm.org/D56540
More information about the cfe-commits
mailing list