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
I think I wrote this bit... it's a hack that I'm not sure deserves to be visible in a header (it was bad enough in JSONRPCDispatcher.cpp!)
Rather than exposing it so we can use it twice, I'd hope we can manage to keep it hidden so that JSON and XPC can share it.