[PATCH] D73218: [clangd] Show background index status using LSP 3.15 work-done progress notifications
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 22 10:51:26 PST 2020
sammccall created this revision.
sammccall added reviewers: kadircet, usaxena95.
Herald added subscribers: llvm-commits, cfe-commits, jfb, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added projects: clang, LLVM.
sammccall updated this revision to Diff 239652.
sammccall added a comment.
sammccall updated this revision to Diff 239653.
Revert changes to VSCode client. This experimental version of the VSCode libs
is fairly new and some corp mirrors we care about are behind ;-)
also clang-format
sammccall added a comment.
revert accidental change
It simply shows the completed/total items on the background queue, e.g.
indexing: 233/1000
The denominator is reset to zero every time the queue goes idle.
The protocol is fairly complicated here (requires creating a remote "progress"
resource before sending updates). We implement the full protocol, but I've added
an extension allowing it to be skipped to reduce the burden on clients - in
particular the lit test takes this shortcut.
The addition of background index progress to DiagnosticConsumer seems ridiculous
at first glance, but I believe that interface is trending in the direction of
"ClangdServer callbacks" anyway. It's due for a rename, but otherwise actually
fits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73218
Files:
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ClangdLSPServer.h
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/ClangdServer.h
clang-tools-extra/clangd/Protocol.cpp
clang-tools-extra/clangd/Protocol.h
clang-tools-extra/clangd/index/Background.cpp
clang-tools-extra/clangd/index/Background.h
clang-tools-extra/clangd/index/BackgroundQueue.cpp
clang-tools-extra/clangd/test/Inputs/background-index/definition.jsonrpc
clang-tools-extra/clangd/test/background-index.test
clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
llvm/include/llvm/Support/JSON.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73218.239653.patch
Type: text/x-patch
Size: 24450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200122/0b0056b1/attachment-0001.bin>
More information about the cfe-commits
mailing list