[PATCH] D50452: [WIP] clangd XPC adapter
Jan Korous via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 8 08:20:27 PDT 2018
jkorous created this revision.
jkorous added reviewers: arphaman, sammccall, ilya-biryukov, simark.
Herald added subscribers: cfe-commits, dexonsmith, MaskRay, ioeric, mgorny.
Based on our internal discussions we decided to change our direction with XPC support for clangd. We did some extra measurements and found out that JSON serialized over XPC is good enough for our use-case. We also took into consideration that we'd have to deal with support for multiple workspaces in near future.
Probably the simplest solution is to keep XPC completely out of clangd binary and use one clangd instance per workspace. This design means it's the least intrusive change, it's rather simple (compared to adding support for multiple workspaces to clangd itself) and robust (compared to threads-based implementation). Long-term it's hopefully also going to be less maintenance-demanding since it's dependent only on LSP and not it's implementation.
The patch is nearly finished - I just wanted to get some feedback on the design early on (before finishing doxygen annotations, documentation, etc.).
Our approach to testing for the future is to reuse existing clangd lit tests and just send messages through our XPC code. For the time being there's just a single minimal testcase.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50452
Files:
CMakeLists.txt
Features.inc.in
clangd/CMakeLists.txt
clangd/xpc/initialize.test
lit.cfg
lit.site.cfg.in
xpc/CMakeLists.txt
xpc/README.txt
xpc/cmake/Info.plist.in
xpc/cmake/XPCServiceInfo.plist.in
xpc/cmake/modules/CreateClangdXPCFramework.cmake
xpc/framework/CMakeLists.txt
xpc/framework/ClangdXPC.cpp
xpc/test-client/CMakeLists.txt
xpc/test-client/ClangdXPCTestClient.cpp
xpc/tool/CMakeLists.txt
xpc/tool/ClangdSubprocess.cpp
xpc/tool/ClangdSubprocess.h
xpc/tool/ClangdWorkspaceInstances.cpp
xpc/tool/ClangdWorkspaceInstances.h
xpc/tool/ClangdXpcAdapter.cpp
xpc/tool/log.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50452.159717.patch
Type: text/x-patch
Size: 52771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180808/54d41f93/attachment-0001.bin>
More information about the cfe-commits
mailing list