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

Chore/go package #1282

Merged
merged 1 commit into from
Apr 8, 2020
Merged

Chore/go package #1282

merged 1 commit into from
Apr 8, 2020

Conversation

mmeloni
Copy link
Contributor

@mmeloni mmeloni commented Mar 30, 2020

In order to properly include pb.proto in other .proto files


This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Mar 30, 2020

CLA assistant check
All committers have signed the CLA.

@jarifibrahim
Copy link
Contributor

Hey @mmeloni Thank you so much for the PR. Would this PR fix #1208 ?

@mmeloni
Copy link
Contributor Author

mmeloni commented Mar 31, 2020

@jarifibrahim I can try to test it. How I should do?

@jarifibrahim
Copy link
Contributor

@mmeloni A simple test would be to import badger v1.6 and badger v2.0 in a single go program and try to run it.

It looks like the issue isn't fixed by your PR. I see the following error on master and your PR

panic: proto: duplicate enum registered: pb.ManifestChange_Operation

goroutine 1 [running]:
github.com/golang/protobuf/proto.RegisterEnum(...)
	/home/ibrahim/Projects/go/pkg/mod/github.com/golang/protobuf@v1.3.1/proto/properties.go:459
github.com/dgraph-io/badger/v2/pb.init.0()
	/home/ibrahim/Projects/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.2/pb/pb.pb.go:638 +0x459
exit status 2

@jarifibrahim
Copy link
Contributor

@mmeloni can you please add some information to the PR description about why this change is necessary? My understanding of protobufs is very limited. Thank you :)

@mmeloni
Copy link
Contributor Author

mmeloni commented Mar 31, 2020

Sure,
please take a look at https://developers.google.com/protocol-buffers/docs/reference/go-generated#package first.
In my case go_package was needed to correct import badger .proto types in another .proto file.

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

:lgtm: Thanks for the PR @mmeloni

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ashish-goswami and @manishrjain)

@jarifibrahim jarifibrahim merged commit 69f35b3 into dgraph-io:master Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants