[PATCH] D90750: [clangd] Introduce ProjectAwareIndex
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 06:25:16 PST 2020
sammccall added a comment.
In D90750#2378987 <https://reviews.llvm.org/D90750#2378987>, @kadircet wrote:
> The index has the following query semantics:
Rehashing offline conversation:
- These heuristics mostly amount to guessing which high-level operation is being performed. It's a non-obvious place to put this logic, and it's hard to fix without fallout when the guess is wrong.
- These guesses will get stale. e.g. this queries all indexes for relations, but one index for lookup. We'd like to use both for Hover soon.
Our conclusion was we could query one index by default, and allow callers to override this using a context variable.
The arguments for a context variable vs attributes on request:
- it naturally applies to batches of requests
- it's a less invasive change
- it "hides" the option from other indexes
I'm not that sure about this implementation choice, but it also probably doesn't matter much.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90750/new/
https://reviews.llvm.org/D90750
More information about the cfe-commits
mailing list