[PATCH] D53387: [clangd] Lay JSONRPCDispatcher to rest.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 17 15:15:06 PDT 2018
sammccall created this revision.
sammccall added a reviewer: ioeric.
Herald added subscribers: cfe-commits, kadircet, jfb, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov, mgorny.
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).
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53387
Files:
clangd/CMakeLists.txt
clangd/ClangdLSPServer.cpp
clangd/ClangdLSPServer.h
clangd/JSONRPCDispatcher.cpp
clangd/JSONRPCDispatcher.h
clangd/ProtocolHandlers.cpp
clangd/ProtocolHandlers.h
clangd/TUScheduler.cpp
clangd/tool/ClangdMain.cpp
test/clangd/crash-non-added-files.test
test/clangd/delimited-input-comment-at-the-end.test
test/clangd/fixits-command.test
test/clangd/rename.test
test/clangd/spaces-in-delimited-input.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53387.170038.patch
Type: text/x-patch
Size: 59284 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181017/3e90c870/attachment-0001.bin>
More information about the cfe-commits
mailing list