sdk-go icon indicating copy to clipboard operation
sdk-go copied to clipboard

CloudEvent proto with wrong definition of go_package option

Open AFMiziara opened this issue 1 year ago • 0 comments

I am trying to import CloudEvent as a direct dependency in one of my gRPC services definitions and I am building the whole application with Bazel. I managed to import the proto itself, but then I got the following error:

bazel-out/darwin-fastbuild/bin/proto/xyz/abc/xxx/v1/xxxv1_go_proto_/github.com/xxx-io/go/proto/xxx/xyz/abc/v1/service.pb.go:10:5: could not import / (import path cannot be absolute path)

This is caused, because right now we have this definition of go_package option: https://github.com/cloudevents/sdk-go/blob/70abff67deec3c82098aca9beb391ee4d8ae0c67/binding/format/protobuf/v2/pb/cloudevent.proto#L5

When it should reflect the full import path of the generated Go code:

option go_package = "github.com/cloudevents/sdk-go/binding/format/protobuf/v2/pb"

AFMiziara avatar Oct 20 '23 14:10 AFMiziara