Skip to content

[FR]: How does gRPC generation work? #81

@antspy

Description

@antspy

What is the current behavior?

Hi,

I am using this toolchain to compile protos without having to compile protoc from scratch, which makes a ton of sense.

Now I am trying to also add gRPC generation to my proto files. I tried using python macros from rules_proto_grpc or from the main grpc repo itself, but in both cases, it seems like they are trying to rebuild protoc or grpc, and my builds fail because I have set the following in my .bazelrc:

common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --incompatible_enable_proto_toolchain_resolution

Describe the feature

Is there a way to also call grpc in the same way?

If not, how are you supposed to get around the GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT flag? Using which macros / toolchains?

An example / pointer would be much appreciated! Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions