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

Filename plugin.proto is too generic, leading to conflict #4

Closed
ringods opened this issue Jun 28, 2022 · 2 comments
Closed

Filename plugin.proto is too generic, leading to conflict #4

ringods opened this issue Jun 28, 2022 · 2 comments

Comments

@ringods
Copy link

ringods commented Jun 28, 2022

I just bumped into this error, using pact-go together with the Go pulumi sdk, both registering plugin.proto:

panic: proto: file "plugin.proto" is already registered
        previously from: "github.com/pact-foundation/pact-go/v2/internal/native"
        currently from:  "github.com/pulumi/pulumi/sdk/v3/proto/go"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

Although both files have different go_package directives, as you can see here:

this doesn't seem to be enough. The filenames need to be unique as well, according this comment:

golang/protobuf#1122 (comment)

I’m from Pulumi and will submit a PR to change our filenames, but I strongly suggest to that you also rename your file to e.g. pact-plugin.proto or pact/plugin.proto to prevent future filename collisions. Since protobuf-go v1.26, such a filename collision generates a panic.

mefellows added a commit to pact-foundation/pact-go that referenced this issue Jun 28, 2022
@mefellows
Copy link
Member

Thanks for reporting @ringods - I've just pushed out a fix to Pact Go now: pact-foundation/pact-go@60aaec1.

@ringods
Copy link
Author

ringods commented Jul 14, 2022

Fixed at Pulumi side with pulumi/pulumi#10074

YOU54F added a commit that referenced this issue May 10, 2024
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

No branches or pull requests

2 participants