This is an archive of the discontinued LLVM Phabricator instance.

[clangd/index/remote]NFC: Adapt code to newer grpc/protobuf versions
ClosedPublic

Authored by MatzeB on Feb 22 2023, 3:44 PM.

Details

Summary

It seems newer grpc / protobuf versions renamed Status::error_message() and Status::error_code() to message()
and code() to prepare for replacement with absl::Status with the same names.

As far as I can tell the new names are already available in the grpc-1.36 version mentioned in the README file.

Diff Detail

Event Timeline

MatzeB created this revision.Feb 22 2023, 3:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2023, 3:44 PM
MatzeB requested review of this revision.Feb 22 2023, 3:44 PM

I need this change to fix compilation in our environment which uses grpc-1.42.0...

MatzeB edited the summary of this revision. (Show Details)Feb 22 2023, 3:44 PM
kadircet accepted this revision.Feb 23 2023, 1:19 AM

thanks, indeed the protobuf version used by grpc-1.36.3 has these available, https://github.com/protocolbuffers/protobuf/blob/19fb89416f3fdc2d6668f3738f444885575285bc/src/google/protobuf/stubs/status.h.

if you don't mind me asking, are you deliberately building remote-index components? i.e. do you have an internal remote-index server/deployment ? Asking as it'd be great to know that we've adoption here, outside of ourselves.

OTOH, if you're not actually using it, this shouldn't be built unless -DCLANGD_ENABLE_REMOTE=1 is part of the build config, hence we might have a bug in the build configuration and I'd like to make sure it's fixed.

This revision is now accepted and ready to land.Feb 23 2023, 1:19 AM

if you don't mind me asking, are you deliberately building remote-index components? i.e. do you have an internal remote-index server/deployment ? Asking as it'd be great to know that we've adoption here, outside of ourselves.

OTOH, if you're not actually using it, this shouldn't be built unless -DCLANGD_ENABLE_REMOTE=1 is part of the build config, hence we might have a bug in the build configuration and I'd like to make sure it's fixed.

Thanks for looking into it. Yes, we use -DCLANGD_ENABLE_REMOTE=On and provide grpc path with -DGRPC_INSTALL_PATH.

Asking as it'd be great to know that we've adoption here, outside of ourselves.

I'm not involved in any of this myself. But @kuganv is :)

MatzeB updated this revision to Diff 499909.Feb 23 2023, 10:23 AM
This revision was landed with ongoing or failed builds.Feb 23 2023, 11:27 AM
This revision was automatically updated to reflect the committed changes.