[PATCH] D69263: [clangd] Implement cross-file rename.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 22 08:18:52 PDT 2019
hokein marked an inline comment as done.
hokein added a comment.
Thanks for the comments.
In D69263#1716760 <https://reviews.llvm.org/D69263#1716760>, @ilya-biryukov wrote:
> Another important concern is surfacing errors to the users: silently dropping ranges for stale files is definitely not the nicest option, I'm afraid this will lead to non-explainable failure modes and users will be incredibly unhappy...
Agree, I think we should surface this error to users when the index is stale or we don't have enough confident to perform the rename.
Thinking more about this -- we have a dynamic index (for all opened files) which is overlaid on a static index (which is a background index in open-source world), so for all affected files, they are either in
1. an open state -- we can rely on the dynamic index, I think it is safe to assume that index always returns up-to-date results;
2. a non-open state -- rely on the background index, however background index has more chance to be stale (especially we don't detect file-change events at the moment), we could do a range patch heuristically to mitigate this stale issue. Failing that, we surface the error to users.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69263/new/
https://reviews.llvm.org/D69263
More information about the cfe-commits
mailing list