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

Cannot use "getDefaultInstance()" method because trezor-develop-SNAPSHOT.jar includes the com.google.protobuf.DescriptorProtos class. #5

Closed
gary-rowe opened this issue Oct 28, 2014 · 4 comments
Assignees

Comments

@gary-rowe
Copy link
Contributor

User @ollekullberg provided the following feedback:

When compiling MBHD i get this warning:

[INFO] Including org.objenesis:objenesis:jar:1.0 in the shaded jar.
[WARNING] protobuf-java-2.5.0.jar, trezor-develop-SNAPSHOT.jar define 90 overlappping classes:
[WARNING] - com.google.protobuf.DescriptorProtos$DescriptorProtoOrBuilder
[WARNING] - com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode$1
[WARNING] - com.google.protobuf.DescriptorProtos$FieldDescriptorProtoOrBuilder
[WARNING] - com.google.protobuf.DescriptorProtos$FileOptions$Builder
[WARNING] - com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder
[WARNING] - com.google.protobuf.DescriptorProtos$FileDescriptorSetOrBuilder
[WARNING] - com.google.protobuf.DescriptorProtos$ServiceOptions$Builder
[WARNING] - com.google.protobuf.DescriptorProtos$FieldOptionsOrBuilder
[WARNING] - com.google.protobuf.DescriptorProtos$MessageOptionsOrBuilder
[WARNING] - com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$1
[WARNING] - 80 more...

The warning seems to be caused by trezor-develop-SNAPSHOT.jar, and I can see that JAR has com.google.protobuf.DescriptorProtos inside it. This seems very strange, since this class belongs in the protobuf-java-2.5.0.jar. And for me this is even worse since it means that i cannot use getDefaultInstance() (on a ProtoBuf object I have created) because of this conflict.

Why is the DescriptorProtos in the Trezor JAR? Can it be removed/renamed or even excluded in the dependency?

@gary-rowe
Copy link
Contributor Author

This was left in the project in error. Early on the protobuf compiler warned that it couldn't find the class during compilation and after failing to get it to recognise protobuf on the classpath I hard coded it.

I've removed it now so the latest snapshot should cover it. This has been pushed to the Bitcoin Solutions Staging Repo.

Ready for review and close.

@ollekullberg
Copy link

Thank you very much. I actually downloaded the source for Mulitbit-hardware
to have a look myself, but I didn't get very far. Will have a go tomorrow.

/br Olle

On Tue, Oct 28, 2014 at 8:56 AM, Gary Rowe notifications@github.com wrote:

This was left in the project in error. Early on the protobuf compiler
warned that it couldn't find the class during compilation and after failing
to get it to recognise protobuf on the classpath I hard coded it.

I've removed it now so the latest snapshot should cover it. This has been
pushed to the Bitcoin Solutions Staging Repo.

Ready for review and close.


Reply to this email directly or view it on GitHub
#5 (comment)
.

@gary-rowe
Copy link
Contributor Author

This works for me, so I'll close it now.

@gary-rowe gary-rowe self-assigned this Nov 7, 2014
@ollekullberg
Copy link

Yeah I forgot to close this, sorry. It works fine.

/br Olle

On Fri, Nov 7, 2014 at 2:03 PM, Gary Rowe notifications@github.com wrote:

Closed #5
#5.


Reply to this email directly or view it on GitHub
#5 (comment)
.

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