You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only import SwiftProtobuf when WKTs are used as input/output
Modification:
The code generator imports SwiftProtobuf if the file being generated has
a dependency on any of the protos bundled by SwiftProtobuf. This can
yield unnecessary imports which may warn if used in conjunction with
access levels on imports.
The problem is that the grpc generator checks for dependencies on the
FileDescriptor which may include messages defined in the same file as a
service. If any of those messages depend on a well known type (WKT) then
an import will be added even though the code being generated doesn't
include message code.
Modifications:
- Only include a SwiftProtobuf import if an input or output type for an
RPC is a bundled proto.
- Fix a test where a WKT is used in a message but not as an input/output
type for an RPC.
Result:
Fewer warnings
0 commit comments