Re: [PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-12 Thread David Blaikie via cfe-commits
I mention it only out of interest of deduplication of functionality/code within the LLVM project as a whole. Be nice not to maintain two things if one would suffice. On Thu, Oct 12, 2017 at 6:21 AM Sam McCall wrote: > Interesting - this is pretty primitive, and still

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315577: [clangd] less boilerplate in RPC dispatch (authored by sammccall). Repository: rL LLVM https://reviews.llvm.org/D38464 Files: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp

Re: [PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-12 Thread Sam McCall via cfe-commits
Interesting - this is pretty primitive, and still fairly tightly coupled to JSON-RPC. I can't easily tell from the code how the ORC RPC functionality - would it be easy to use with JSON-RPC, does it make sense to use serialization only, does it have opinions about threading models? And really,

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 118782. sammccall added a comment. Rebase https://reviews.llvm.org/D38464 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/JSONRPCDispatcher.cpp clangd/JSONRPCDispatcher.h clangd/Protocol.cpp clangd/Protocol.h

Re: [PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-09 Thread David Blaikie via cfe-commits
hey Lang (& folks here) any chance there's some overlap between the RPC functionality here and the RPC functionality in ORC that could be deduplicated/refactored? On Fri, Oct 6, 2017 at 5:30 AM Ilya Biryukov via Phabricator via cfe-commits wrote: > ilya-biryukov

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Note there's a new LSP method handler added upstream (`textDocument/signatureHelp`), we should add it to this change before submitting. Comment at:

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks! All addressed (except removing ShutdownParams, which I'm not sure is worthwhile). Comment at: clangd/ClangdLSPServer.h:47 // Implement ProtocolCallbacks. - void onInitialize(StringRef ID, InitializeParams IP, -

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 117835. sammccall marked 5 inline comments as done. sammccall added a comment. - ClangLSPServer.h should refer to ShutdownParams, not NoParams - Address review comments https://reviews.llvm.org/D38464 Files: clangd/ClangdLSPServer.cpp

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.h:47 // Implement ProtocolCallbacks. - void onInitialize(StringRef ID, InitializeParams IP, -JSONOutput ) override; - void onShutdown(JSONOutput ) override; - void

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.h:47 // Implement ProtocolCallbacks. - void onInitialize(StringRef ID, InitializeParams IP, -JSONOutput ) override; - void onShutdown(JSONOutput ) override; - void

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 117374. sammccall added a comment. - clang-format https://reviews.llvm.org/D38464 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/JSONRPCDispatcher.cpp clangd/JSONRPCDispatcher.h clangd/Protocol.cpp clangd/Protocol.h

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Make the ProtocolHandlers glue between JSONRPCDispatcher and ClangdLSPServer generic. Eliminate small differences between methods, de-emphasize the unimportant distinction between notifications and methods. ClangdLSPServer is no longer responsible for producing a