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
Objc update WKT generated import paths. #23228
Conversation
@@ -52,15 +52,16 @@ inline ::grpc::string ImportProtoHeaders( | |||
|
|||
::grpc::string base_name = header; | |||
grpc_generator::StripPrefix(&base_name, "google/protobuf/"); | |||
::grpc::string file_name = "GPB" + base_name; |
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.
@ thomasvl - could you confirm that your change in protobuf follows the pattern of 1) moving WKT files from objectivec/google/protobuf/
to objectivec/
and 2) add GPB
prefix to the headers?
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.
I've already check with Thomas, we just need to update paths from objectivec/google/protobuf/
to objectivec/
and add GPB
prefix to the headers.
He mentioned that we also need to set the min version of protobuf to the release(v3.12.0) where they shipped this. I've check !ProtoCompiler.podspec, the version is 3.12.2, looks like we don't need to change it.
@@ -52,15 +52,16 @@ inline ::grpc::string ImportProtoHeaders( | |||
|
|||
::grpc::string base_name = header; | |||
grpc_generator::StripPrefix(&base_name, "google/protobuf/"); |
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.
I am thinking that if protobuf moved things out of google/protobuf
, users should probably not continue to use google/protobuf
prefix in their #import
statement? That sounds like a breaking change though so I'm not sure if that's true.
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.
They only changed paths of .pbobjc.h/m files. For .proto files, their paths are still the same. The header
variable is generated based on these .proto files, so we still need to strip google/protobuf
prefix.
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.
Ah that makes sense!
Works around #23195
Generated reference to the WellKnownTypes (WKTs) bundled with the ObjC Protobuf library has been changed(protocolbuffers/protobuf#7173). Updates their import paths.