Skip to content
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

relative .pb.go generation, go_package set to package name #969

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

jnorman-us
Copy link
Contributor

@jnorman-us jnorman-us commented Oct 24, 2023

addresses #962

In the .proto file, option go_package is used for pointing to the generated pb package. I'm importing the cloudevents.proto for creating gRPC handlers functions that accept a CloudEvent, but the import breaks because go_package points to a local path.

I set go_package to github.com/cloudevents/sdk-go/binding/format/protobuf/v2/pb which Go is able to resolve. However generation was broken until I found this protoc flag in a StackOverflow answer: --go-opts=paths=source_relative.

I also changed the package name to io.cloudevents.v1, just like the format here. Package names are supposed to be unique so there aren't collisions when importing multiple protobuf files.

@duglin
Copy link
Contributor

duglin commented Oct 24, 2023

SGTM but I know next to nothing about proto, so @embano1 and @lionelvillard for review

@duglin
Copy link
Contributor

duglin commented Nov 7, 2023

ping @embano1 @lionelvillard

@duglin
Copy link
Contributor

duglin commented Nov 22, 2023

@jnorman-us can you please rebase this?
ping @embano1 for review.

Copy link
Member

@embano1 embano1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

AYS289 and others added 2 commits December 8, 2023 00:08
Signed-off-by: AYS289 <joseph.norman@capitalone.com>
Signed-off-by: AYS289 <jnormantransactions@gmail.com>
@embano1 embano1 merged commit 39fe13d into cloudevents:main Dec 8, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants