[PATCH] D53946: [clangd] Signal when skipping the diagnostic rebuilds.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 31 12:26:11 PDT 2018
sammccall added a comment.
Discussed offline a bit. We should be judicious with intrusive changes to support out-of-tree clients, and this interface seems a bit messy.
There are alternatives with advantages:
1. less intrusive: clients can create a context before calling addDocument and observe its death to know that there will be no more notifications. This is a bit subtle, we can add a test.
2. avoid the special case: we could store diagnostics so we can always emit them (move out of ParsedAST). I actually think they belong in ParsedAST, and this is a bit wasteful, so not sure about this.
3. address the use case directly: the client wants to know what's going on with the file. We could define a per-file status structure, and send the client a stream of updates. (Via LSP: a notification like diagnostics themselves). This can be used for "is building", "has a fallback CompileCommand", etc. And debug info: size in index, AST size, preamble size...
My preference would be pushing clients towards 1 for now and getting to 3 eventually.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53946
More information about the cfe-commits
mailing list