Remote server should not send messages that are invalid and will cause problems
on the client side. The client should not be affected by server's failures
whenever possible.
Also add more error messages and logs.
Paths
| Differential D83826
[clangd] Don't send invalid messages from remote index ClosedPublic Authored by kbobyrev on Jul 14 2020, 3:39 PM.
Details Summary Remote server should not send messages that are invalid and will cause problems Also add more error messages and logs.
Diff Detail
Event TimelineComment Actions
I'm not sure about the error-handling strategy here:
I'd suggest leaving out detailed error reporting for now, and reporting at the top level. You may need some mechanism to distinguish invalid vs filtered-out data.
Comment Actions
As far as I can tell, 1-based indexing isn't an option that's available. Where do you see that it is? Comment Actions
Can you give an example of this? Missing d
Fair enough, will do. Thanks!
kbobyrev marked an inline comment as done. Comment ActionsSmall update: resolve a couple of comments. Comment Actions Wrap marshalling into a class, think about filtering vs failing? I think filtering should be done on the clangd-indexer side and marshalling should deal with valid symbols only and shouldn't have to filter them. kbobyrev marked 2 inline comments as done. Comment ActionsRefactor marshalling into a class, log errors only on the high level. sammccall added inline comments.
This revision is now accepted and ready to land.Jul 20 2020, 8:23 AM kbobyrev marked 5 inline comments as done. Comment ActionsAddress post-LGTM comments, rebase on top of HEAD. Closed by commit rGeef162c330b0: [clangd] Don't send invalid messages from remote index (authored by kbobyrev). · Explain WhyJul 21 2020, 2:05 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 278086 clang-tools-extra/clangd/index/remote/Client.cpp
clang-tools-extra/clangd/index/remote/marshalling/Marshalling.h
clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
clang-tools-extra/clangd/index/remote/server/Server.cpp
clang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
|
clang-tidy: error: 'grpc++/grpc++.h' file not found [clang-diagnostic-error]
not useful