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

proto: duplicate proto type registered when using tracers with importing ipfs/go-log #40

Closed
mhchia opened this issue Aug 10, 2018 · 3 comments · Fixed by #41
Closed
Assignees

Comments

@mhchia
Copy link

mhchia commented Aug 10, 2018

What is wrong?

$ ./test-proto-tracerstate
proto: duplicate proto type registered: basictracer_go.wire.TracerState

is printed while we use the tracer from appdash, along with ipfs/go-log imported by some of our libp2p dependencies. I can reproduce it by building and running this go file in my environment(macOS, go1.10.3)

How can it be fixed?

IIUC, the cause might be that the protobuf wire messages in ipfs/go-log and opentracing/basictracer-go have the same package name and message name. In this case, the name of proto message will be registered twice, due to the call to init() in *.pb.go.
My first thought to solve this issue is to rename one of the proto. However, I'm not so sure of the usage. It might also be the case that I misused the two packages.

Thank you:)

@mhchia
Copy link
Author

mhchia commented Aug 10, 2018

cc @NIC619

@Stebalien
Copy link
Member

We should rename the protobuf in go-log.

Stebalien added a commit that referenced this issue Aug 10, 2018
Also, regenerate with the latest gogo protobuf package.

fixes #40
@ghost ghost assigned Stebalien Aug 10, 2018
@ghost ghost added the status/in-progress In progress label Aug 10, 2018
@ghost ghost removed the status/in-progress In progress label Aug 10, 2018
@mhchia
Copy link
Author

mhchia commented Aug 11, 2018

Thanks a lot!

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 a pull request may close this issue.

2 participants