Repository navigation
Conversation
Wire now bundles google/rpc/status.proto and maps google.rpc.Status to com.squareup.wire.RpcStatus in Kotlin and Java, like it maps google.protobuf.Any to AnyMessage. Generated code no longer needs a googleapis dependency or its own copy, and it can't conflict with com.google.rpc.Status from proto-google-common-protos. GrpcException exposes the grpc-status-details-bin trailer as a decoded RpcStatus, and can be created from one.
Wire now maps google.rpc.Status to RpcStatus and never generates it.
escardin
approved these changes
Nov 9, 2026
escardin
left a comment
There was a problem hiding this comment.
Thanks for doing this, it looks great
oldergod
marked this pull request as ready for review
November 10, 2026 14:47
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wire has
AnyMessageforgoogle.protobuf.Any, but nothing forgoogle.rpc.Status. Users must generatestatus.protofrom googleapis. That class iscom.google.rpc.Status, which conflicts with the class fromproto-google-common-protoswhen grpc-java is also on the classpath. Misk works around this with its ownmisk.proto.Status, which has a different type URL.Statusneeds no special encoding: it is a plain message. This PR adds a shared runtime type for it, and uses that type in gRPC errors.wire-runtime: addRpcStatus. It is Wire's Kotlin output forgoogle/rpc/status.proto, renamed. Its type URL staystype.googleapis.com/google.rpc.Status.wire-schema: bundlegoogle/rpc/status.protoand addProtoType.RPC_STATUS. Astatus.protoon the user's proto path still takes precedence.google.rpc.StatustoRpcStatus, asgoogle.protobuf.Anymaps toAnyMessage. Wire never generates its own copy.wire-grpc-client:GrpcException.rpcStatusdecodes thegrpc-status-details-bintrailer. A new constructor creates the exception from anRpcStatus.Open questions:
RpcStatusinwire-runtimelets any generated code use it without a gRPC dependency. The other choice iswire-grpc-client.status.protothemselves will now getRpcStatusfields instead ofcom.google.rpc.Status. The Proto target also stops emittinggoogle/rpc/status.proto.google.rpc.Statusas a normal message.google/rpc/error_details.proto(ErrorInfo,RetryInfo,BadRequest) could follow in a later PR.