Skip to content

Commit 2c30fbc

Browse files
committed
[clangd] Lay JSONRPCDispatcher to rest.
Summary: Most of its functionality is moved into ClangdLSPServer. The decoupling between JSONRPCDispatcher, ProtocolCallbacks, ClangdLSPServer was never real, and only served to obfuscate. Some previous implicit/magic stuff is now explicit: - the return type of LSP method calls are now in the signature - no more reply() that gets the ID using global context magic - arg tracing no longer relies on RequestArgs::stash context magic either This is mostly refactoring, but some deliberate fixes while here: - LSP method params are now by const reference - notifications and calls are now distinct namespaces. (some tests had protocol errors and needed updating) - we now reply to calls we failed to decode - outgoing calls use distinct IDs A few error codes and message IDs changed in unimportant ways (see tests). Reviewers: ioeric Subscribers: mgorny, ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53387 llvm-svn: 344737
1 parent 4859738 commit 2c30fbc

14 files changed

+411
-661
lines changed

clang-tools-extra/clangd/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ add_clang_library(clangDaemon
2525
FuzzyMatch.cpp
2626
GlobalCompilationDatabase.cpp
2727
Headers.cpp
28-
JSONRPCDispatcher.cpp
2928
JSONTransport.cpp
3029
Logger.cpp
3130
Protocol.cpp
32-
ProtocolHandlers.cpp
3331
Quality.cpp
3432
RIFF.cpp
3533
SourceCode.cpp

0 commit comments

Comments
 (0)