[all-commits] [llvm/llvm-project] 7d20e8: [clangd] Show background index status using LSP 3....
Sam McCall via All-commits
all-commits at lists.llvm.org
Fri Jan 24 03:21:14 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 7d20e80225b3e4f3f5a8c57929061bef55f3d855
https://github.com/llvm/llvm-project/commit/7d20e80225b3e4f3f5a8c57929061bef55f3d855
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2020-01-24 (Fri, 24 Jan 2020)
Changed paths:
M clang-tools-extra/clangd/ClangdLSPServer.cpp
M clang-tools-extra/clangd/ClangdLSPServer.h
M clang-tools-extra/clangd/ClangdServer.cpp
M clang-tools-extra/clangd/ClangdServer.h
M clang-tools-extra/clangd/Protocol.cpp
M clang-tools-extra/clangd/Protocol.h
M clang-tools-extra/clangd/index/Background.cpp
M clang-tools-extra/clangd/index/Background.h
M clang-tools-extra/clangd/index/BackgroundQueue.cpp
M clang-tools-extra/clangd/test/Inputs/background-index/definition.jsonrpc
M clang-tools-extra/clangd/test/background-index.test
M clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
M llvm/include/llvm/Support/JSON.h
Log Message:
-----------
[clangd] Show background index status using LSP 3.15 work-done progress notifications
Summary:
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.
Reviewers: kadircet, usaxena95
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73218
More information about the All-commits
mailing list