Skip to content

protoc-gen-go: add stability warning to XxxServer and XxxClient #960

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions protoc-gen-go/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi
g.P(fmt.Sprintf(`// %sClient is the client API for %s service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.`, servName, servName))
g.P("//")
g.P("// Unstable: When implementing, embed an anonymous ", servName, "Client field from New", servName, "Client for forward compatibility.")

// Client interface.
if deprecated {
Expand Down Expand Up @@ -210,6 +212,8 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi
// Server interface.
serverType := servName + "Server"
g.P("// ", serverType, " is the server API for ", servName, " service.")
g.P("//")
g.P("// Unstable: When implementing, embed an anonymous Unimplemented", serverType, " field for forward compatibility.")
if deprecated {
g.P("//")
g.P(deprecationComment)
Expand Down
4 changes: 4 additions & 0 deletions protoc-gen-go/testdata/deprecated/deprecated.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions protoc-gen-go/testdata/grpc/grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions protoc-gen-go/testdata/grpc/grpc_empty.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.