[PATCH] D48559: [clangd] refactoring for XPC transport layer [NFCI]

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 25 13:02:09 PDT 2018


jkorous created this revision.
jkorous added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, MaskRay, ioeric, ilya-biryukov, mgorny.

Hi all,

We finally finished a self-contained first version of our implementation of alternative transport layer for macOS based on XPC.

To enable this I did couple of changes to current clangd design. Generally I aimed for small amount of disruption and tried to keep it simple.

The notable changes are:

- enabled registration of request handlers to different dispatchers by templatizing registerCallbackHandlers()
- factored out parts of JsonDispatcher that could be reused (created DispatcherCommon.h/cpp)
- created abstraction over JsonOutput (class LSPOutput)
- removed of ClangdLSPServer::run() method so server can be run with different dispatcher
- published IsDone and ShutdownRequestReceived through methods in ClangdLSPServer class interface to support new dispatcher

We are also putting up the transport layer implementation itself for a review soon so it will be more obvious where are we going to and what motivated some of these changes.

Big thanks in advance to all reviewers!

Jan


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D48559

Files:
  CMakeLists.txt
  ClangdLSPServer.cpp
  ClangdLSPServer.h
  DispatcherCommon.cpp
  DispatcherCommon.h
  JSONRPCDispatcher.cpp
  JSONRPCDispatcher.h
  LSPOutput.h
  ProtocolHandlers.cpp
  ProtocolHandlers.h
  tool/ClangdMain.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48559.152753.patch
Type: text/x-patch
Size: 27815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180625/7ac63eed/attachment-0001.bin>


More information about the cfe-commits mailing list