Re: [protobuf] ambiguous Builder errors when compiling a Maven project
I've never seen this error. It doesn't make much sense -- protobuf generated code should not contain any imports. Are you modifying the generated code in some way? On Sun, Dec 19, 2010 at 11:47 PM, Xiao Ling bardm...@gmail.com wrote: Hi All, I have a generated protobuf java file which compiles alone under both ECJ and Oracle jdk. When the file is compiled together with other Java and Scala files in a Maven project, the compilation keeps outputing some error messages as follows: DocumentProtos.java:1092: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder newBuilderForType() { return newBuilder(); } ^ DocumentProtos.java:1096: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder toBuilder() { return newBuilder(this); } Does anybody have any idea why so? Thanks, -XL -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] ambiguous Builder errors when compiling a Maven project
You're right. There is no imports in the code. The message was printed out by maven. As said, the file compiles ok by its own. Here is the situation: I have both scala and java code in my project. As long as there is some scala code calls the protobuf code (which is in java), the maven-scala-plugin (that is reponsible for compiling both scala and java code) gives the error messages. Thanks, --Xiao On Wed, Dec 22, 2010 at 4:13 PM, Kenton Varda ken...@google.com wrote: I've never seen this error. It doesn't make much sense -- protobuf generated code should not contain any imports. Are you modifying the generated code in some way? On Sun, Dec 19, 2010 at 11:47 PM, Xiao Ling bardm...@gmail.com wrote: Hi All, I have a generated protobuf java file which compiles alone under both ECJ and Oracle jdk. When the file is compiled together with other Java and Scala files in a Maven project, the compilation keeps outputing some error messages as follows: DocumentProtos.java:1092: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder newBuilderForType() { return newBuilder(); } ^ DocumentProtos.java:1096: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder toBuilder() { return newBuilder(this); } Does anybody have any idea why so? Thanks, -XL -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] ambiguous Builder errors when compiling a Maven project
Sorry, I don't know how the scala plugin works. It sounds like it has a bug. Perhaps it generates its own code based on the Java code, and somehow that code ends up broken given this particular input... On Wed, Dec 22, 2010 at 4:39 PM, Xiao Ling bardm...@gmail.com wrote: You're right. There is no imports in the code. The message was printed out by maven. As said, the file compiles ok by its own. Here is the situation: I have both scala and java code in my project. As long as there is some scala code calls the protobuf code (which is in java), the maven-scala-plugin (that is reponsible for compiling both scala and java code) gives the error messages. Thanks, --Xiao On Wed, Dec 22, 2010 at 4:13 PM, Kenton Varda ken...@google.com wrote: I've never seen this error. It doesn't make much sense -- protobuf generated code should not contain any imports. Are you modifying the generated code in some way? On Sun, Dec 19, 2010 at 11:47 PM, Xiao Ling bardm...@gmail.com wrote: Hi All, I have a generated protobuf java file which compiles alone under both ECJ and Oracle jdk. When the file is compiled together with other Java and Scala files in a Maven project, the compilation keeps outputing some error messages as follows: DocumentProtos.java:1092: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder newBuilderForType() { return newBuilder(); } ^ DocumentProtos.java:1096: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder toBuilder() { return newBuilder(this); } Does anybody have any idea why so? Thanks, -XL -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] ambiguous Builder errors when compiling a Maven project
I agree. I'm going to ask the maven-scala-plugin guys then. Thanks, --Xiao On Wed, Dec 22, 2010 at 4:53 PM, Kenton Varda ken...@google.com wrote: Sorry, I don't know how the scala plugin works. It sounds like it has a bug. Perhaps it generates its own code based on the Java code, and somehow that code ends up broken given this particular input... On Wed, Dec 22, 2010 at 4:39 PM, Xiao Ling bardm...@gmail.com wrote: You're right. There is no imports in the code. The message was printed out by maven. As said, the file compiles ok by its own. Here is the situation: I have both scala and java code in my project. As long as there is some scala code calls the protobuf code (which is in java), the maven-scala-plugin (that is reponsible for compiling both scala and java code) gives the error messages. Thanks, --Xiao On Wed, Dec 22, 2010 at 4:13 PM, Kenton Varda ken...@google.com wrote: I've never seen this error. It doesn't make much sense -- protobuf generated code should not contain any imports. Are you modifying the generated code in some way? On Sun, Dec 19, 2010 at 11:47 PM, Xiao Ling bardm...@gmail.com wrote: Hi All, I have a generated protobuf java file which compiles alone under both ECJ and Oracle jdk. When the file is compiled together with other Java and Scala files in a Maven project, the compilation keeps outputing some error messages as follows: DocumentProtos.java:1092: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder newBuilderForType() { return newBuilder(); } ^ DocumentProtos.java:1096: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder toBuilder() { return newBuilder(this); } Does anybody have any idea why so? Thanks, -XL -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] ambiguous Builder errors when compiling a Maven project
Hi All, I have a generated protobuf java file which compiles alone under both ECJ and Oracle jdk. When the file is compiled together with other Java and Scala files in a Maven project, the compilation keeps outputing some error messages as follows: DocumentProtos.java:1092: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder newBuilderForType() { return newBuilder(); } ^ DocumentProtos.java:1096: error: reference to Builder is ambiguous; it is both defined in object Document and imported subsequently by import Mention._ public Builder toBuilder() { return newBuilder(this); } Does anybody have any idea why so? Thanks, -XL -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.