[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG67b2dbd5a335: [clangd] Extend dexp to support remote index (authored by kbobyrev). Changed prior to commit: https://reviews.llvm.org/D78521?vs=259859&id=259869#toc Repository: rG LLVM Github Monorepo

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: clang-tools-extra/clangd/index/remote/Client.cpp:64 + llvm::function_ref Callback) const { +streamRPC( +Request, &remote::SymbolIndex::Stub::Lookup, Callback); ---

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259859. kbobyrev marked 16 inline comments as done. kbobyrev added a comment. Address the last round of comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. LG, nits apart from the llvm_unreachable in unimplemented, let's discuss further if you disagree on that. We do have to go back and add unit tests for this stuff. I'm OK with doing that

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259839. kbobyrev added a comment. Don't use callback on the last message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-tools-extra/clangd/CMakeLists.

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259836. kbobyrev marked 6 inline comments as done. kbobyrev added a comment. Resolve the last comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/remote/Index.cpp:27 +llvm::StringRef SpanName, SymbolIndex::Stub *Stub, ClangdRequestT Request, +std::function>( +SymbolIndex::Stub *, grpc::ClientContext *, const RPCRequestT &)> -

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259762. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Resolve couple more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: cla

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp:18 #include "index/dex/Dex.h" +#include "index/remote/Client.h" #include "llvm/ADT/ScopeExit.h" sammccall wrote: > Being able to include this header but not call the fu

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259701. kbobyrev marked 13 inline comments as done. kbobyrev added a comment. Resolve comments that refer to the outdated patch and address few small issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/Features.inc.in:2 #define CLANGD_BUILD_XPC @CLANGD_BUILD_XPC@ +#define CLANGD_REMOTE @CLANGD_ENABLE_REMOTE@ nit: can we use the same name for the cmake variable and the preprocessor define?

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259644. kbobyrev marked an inline comment as done. kbobyrev added a comment. Resolve the last comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-t

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259604. kbobyrev added a comment. Implement (B) for now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259553. kbobyrev added a comment. Convert plain function pointers to std::function in templates. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-tools-e

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259547. kbobyrev marked 13 inline comments as done. kbobyrev added a comment. Address the remaining comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files:

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/remote/Index.cpp:97 +std::unique_ptr connect(llvm::StringRef Address) { +#ifdef CLANGD_REMOTE + return std::unique_ptr(new IndexClient(Address)); sammccall wrote: > if remote is disabled

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/remote/Index.proto:37 +message FuzzyFindReply { + // FIXME(kirillbobyrev): Convert to Symbol. + repeated string symbols = 1; sammccall wrote: > kbobyrev wrote: > > sammccall wrote: > > >

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259356. kbobyrev marked 10 inline comments as done. kbobyrev added a comment. Just a checkpoint: resolve several comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D785

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/CMakeLists.txt:161 if (CLANGD_ENABLE_REMOTE) + add_definitions(-D CLANGD_REMOTE) include(FindGRPC) Can we use features.inc.in instead for this? (I don't have a strong opinion on which one

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259257. kbobyrev added a comment. Stream responses in refs() and fuzzyFind() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-tools-extra/clangd/CMakeLis

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259233. kbobyrev marked an inline comment as done. kbobyrev added a comment. Make sure the value of `--remote` flag is stored. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 259167. kbobyrev added a comment. Resolve a couple of FIXMEs. The patch is review-ready now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-tools-extra

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 258958. kbobyrev added a comment. Move type conversions to Marshalling.(h|cpp) and hide IndexClient behind a factory function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 258942. kbobyrev added a comment. Add correct definition and fix build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-tools-extra/clangd/CMakeLists.tx

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 258936. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Implement refs(), address some comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 F

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev marked 5 inline comments as done. kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp:14 +#include "Index.grpc.pb.h" #include "SourceCode.h" sammccall wrote: > this include and the stuff depending on it needs t

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp:14 +#include "Index.grpc.pb.h" #include "SourceCode.h" this include and the stuff depending on it needs to be ifdef'd Comment at: clang-tools-extra

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 258861. kbobyrev added a comment. Fix build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78521/new/ https://reviews.llvm.org/D78521 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clang

[PATCH] D78521: [clangd] Extend dexp to support remote index

2020-04-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. - Make it possible for dexp to use remote server - Remove clangd-index-client (since