-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clangd] Add container field to remote index Refs grpc method #71605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd Author: dupes (tdupes) Changescall hierarchy cannot be enhanced via the remote index because the Refs returned by the remote index do not have the ID of its container. Full diff: https://github.com/llvm/llvm-project/pull/71605.diff 2 Files Affected:
diff --git a/clang-tools-extra/clangd/index/remote/Index.proto b/clang-tools-extra/clangd/index/remote/Index.proto
index 3072299d8f345f2..33bf095d88598f5 100644
--- a/clang-tools-extra/clangd/index/remote/Index.proto
+++ b/clang-tools-extra/clangd/index/remote/Index.proto
@@ -81,6 +81,7 @@ message Symbol {
message Ref {
optional SymbolLocation location = 1;
optional uint32 kind = 2;
+ optional string container = 3;
}
message SymbolInfo {
diff --git a/clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp b/clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
index 7e31ada18a65797..192d6d08fe58cb1 100644
--- a/clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
+++ b/clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
@@ -189,6 +189,7 @@ llvm::Expected<clangd::Ref> Marshaller::fromProtobuf(const Ref &Message) {
return Location.takeError();
Result.Location = *Location;
Result.Kind = static_cast<RefKind>(Message.kind());
+ Result.Container = SymbolId(Ref.container());
return Result;
}
|
This sounds like it might be the culprit behind clangd/clangd#1358 |
Oh I wasn't aware of that issue, that is the exact bug I am aiming to fix. |
31f45a8
to
d2a6bec
Compare
Updated the relevant remote marshalling tests. Please let me know if there are any further testing I should do. I am using this with an unordinary remote grpc service so if there is some integration test or manual process I can test the clangd-indexer & remote server on I would be happy to do further testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot (and sorry for missing this, so far)
clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
Outdated
Show resolved
Hide resolved
Thank you, updated the tests & yaml. Also squashed the changes into one commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
✅ With the latest revision this PR passed the C/C++ code formatter. |
0355db6
to
6c1b256
Compare
Yes this is good to go |
Could you rebase it to apply to latest trunk please? I'm happy to go ahead and merge it then. |
done |
Thanks! I'll go ahead and merge. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/17071 Here is the relevant piece of the build log for the reference
|
call hierarchy cannot be enhanced via the remote index because the Refs returned by the remote index do not have the ID of its container.