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

javanano codegen error when there's only one message in the proto file. #218

Closed
zsurocking opened this issue Feb 25, 2015 · 1 comment
Closed

Comments

@zsurocking
Copy link
Contributor

Javanano codegen fails when there's only one message in the proto file:

syntax = "proto3";
message a {
}

The error complains about irrelevant stuff:
Javanano generator has changed to align with java generator. An outer class will be created for this file and the single message in the file will become a nested class. Use java_multiple_files to skip generating the outer class, or set an explicit java_outer_classname to suppress this message.

Adding another message to the proto file fixes the issue.

Commadline:
protoc --javanano_out=. a.proto

@zsurocking zsurocking changed the title strange javanano error javanano codegen error when there's only one message in the proto file. Feb 25, 2015
@liujisi
Copy link
Contributor

liujisi commented Feb 26, 2015

This message is intended for warn legacy nano users that there will be an outer class generated. You can set the java_outer_classname to suppress the warning message. Also in your example, the message name is the same with the file name, which will lead to conflicted outer classname and nested message name. Setting the java_outer_classname option should make the code compile.

@liujisi liujisi closed this as completed Feb 26, 2015
yordis pushed a commit to yordis/protobuf that referenced this issue Dec 8, 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