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!