[PATCH] D77794: [clangd] Pull installed gRPC and introduce shared-index-(server|client)

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 05:55:44 PDT 2020


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.
kbobyrev updated this revision to Diff 256263.
kbobyrev added a comment.

Rebase on top of the correct revision


This patch allows using installed gRPC to build two simple tools which
currently provide the functionality of looking up the symbol by name.
shared-index-client is a simplified version of dexp which connects to
shared-index-server passes lookup requests.

This patch still needs a couple of cleanups and fixes:

- For some reason currently only some names are successfully looked up (e.g.) namespaces) while some classes can not be discovered. I will investigate it and update the patch with a fix.
- LLVM's custom CMake error breaks build saying some source files are not used even each is used within its target. For now, I just commented out the code producing the error but this needs to be addressed in this patch.
- It is very hard to move the Protobuf generation CMake code from the inner directory above. This is probably OK for this patch, but whenever the generated files will be used outside of these two tools, this needs to be fixed.

I also significantly reduced the scope of this patch to prevent large changelist
and more bugs. The next steps would be:

- Extending Protocol for deep copies of Symbol and inherit SharedIndex from Index to unify the interfaces
- Make shareed-index-server more generic and merge the shared index client with dexp
- Modify Clangd to allow using shared index instead of the local one for all global index requests


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77794

Files:
  clang-tools-extra/clangd/CMakeLists.txt
  clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
  clang-tools-extra/clangd/index/shared/CMakeLists.txt
  clang-tools-extra/clangd/index/shared/SharedIndex.proto
  clang-tools-extra/clangd/index/shared/SharedIndexClient.cpp
  clang-tools-extra/clangd/index/shared/SharedIndexServer.cpp
  llvm/cmake/modules/LLVMProcessSources.cmake

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77794.256263.patch
Type: text/x-patch
Size: 13318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200409/3aea27e1/attachment-0001.bin>


More information about the cfe-commits mailing list