Closed benjaminp closed 1 week ago
@benjaminp Thank you for the report! Good to note!
I suppose this isn't an immediate issue so long as we depend on older versions of the protobuf compiler?
But would be good to resolve soon too so it allows us to upgrade again!
It comes up now for people depending on grpc-web in a monorepo and substituting their own modern versions of protobuf for the 2 year old one in grpc-web's WORKSPACE
.
@benjaminp Aha thanks for informing! That's good to note!
Just to confirm tho, does this error comes up only during compilation time or also during runtime?
If the latter, starting from which version of the proto compiler does it no longer work with grpc-web?
Thanks!
I can't speak to the runtime because the generator not compiling prevents me from testing that out. (It seems all the errors are in the dts generation code, though.)
Ah got it! Thanks!
Looks to me this is a compile time error (for now), that if you use the binaries in our releases it should work for now. Please test that out if you don't mind.
It would certainly be good to upgrade the code soon so it compile with newer protobuf source code.
PRs are very welcome from all here!
In changes like protocolbuffers/protobuf@8b1be51f08f2945e709813ca09c260049b540f9f, protobuf has made private certain descriptor APIs. The grpc-web protobuf generator uses these APIs and thus fails to build with recent protobuf versions. The particular problematic APIs are
FieldDescriptor::has_optional_keyword()
andOneofDescriptor::is_synthetic()
.