[PATCH] D49267: [clangd] Watch for changes in compile_commands.json
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 24 07:58:39 PDT 2018
sammccall added a comment.
Just a couple of high-level comments here:
- I'm not sure we can/should commit to supporting editor-based file watching forever.
- One natural long-term direction would be to get this functionality into `JSONCompilationDatabase`, and clients of that don't have an LSP client to provide events
- client support is going to remain uneven in the foreseeable future. LSP is as always underspecified here, and there's no chance that every editor plugin is going to do a reasonable job of recursive file watching, even among those that advertise support for it.
- if/when we have a native implementation, supporting multiple mechanisms with different layering requirements to get at most a 2x win in watcher resource usage seems like a dubious way to spend our complexity budget.
- it looks like the current design throws away all compilation databases (via the global DB) when *any* compile_commands.json changes. I think it's important that other stateful compilation databases aren't thrown away for unrelated reasons. e.g. the Bazel DB takes nontrivial time to reinitialize.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D49267
More information about the cfe-commits
mailing list