Skip to content

Should we set require_unimplemented_servers=true when generating gRPC-related code? #37699

@SarahFrench

Description

@SarahFrench

Following #37685, when we compile Go gRPC code from our .proto files we use the require_unimplemented_servers=false option:

"--go-grpc_opt=require_unimplemented_servers=false",

This option is described in the documentation here: protoc-gen-go-grpc: Future-proofing services.

Setting require_unimplemented_servers=false is not recommended, but we are currently using it as it matches how our code was generated prior to #37685

However unimplemented server structs are currently being embedding in hashicorp/terraform despite it not being enforced:

Similarly, hashicorp/terraform-plugin-go embeds unimplemented server structs: tfplugin5.UnimplementedProviderServer, tfplugin6.UnimplementedProviderServer

So maybe this shows we should set require_unimplemented_servers=true and make it consistent in this codebase?

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions