Skip to content

httpbody.proto has incorrect go_package #1263

Closed
@ideasculptor

Description

@ideasculptor

Steps you follow to reproduce the error:

  1. When NOT using protobuf APIv2, I can't rely on the google.golang.org/genproto package for the protoc-compiled version of the annotations.proto, http.proto, and httpbody.proto files. Since I'm using grpc, I'm forced to APIv1 for now, which means I need to compile them myself.
  2. protoc --proto_path . --go_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor:. google/api/*.proto
  3. When I compile against the generated files, I get an error from Go that there is more than one package in the same directory.
  4. This is totally consistent with the Buf style guide, which also suggests all .proto files in the same directory should have the same go_package.

Simple fix is to adjust the go_package line in httpbody.proto to match the go_package of the other two protos in google/api

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