SandroGrzicic / ScalaBuff

the scala protocol buffers (protobuf) compiler
Other
219 stars 80 forks source link

Generated Code Produces scalac Warnings #117

Open xanderdunn opened 8 years ago

xanderdunn commented 8 years ago

The procedures should have :Unit = and some of the imports seem unnecessary.

/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtoObs.scala:32: Procedure syntax is deprecated. Convert procedure `writeTo` to method by adding `: Unit =`.
    def writeTo(output: com.google.protobuf.CodedOutputStream) {
                                                               ^
/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtoObs.scala:143: Procedure syntax is deprecated. Convert procedure `writeTo` to method by adding `: Unit =`.
    def writeTo(output: com.google.protobuf.CodedOutputStream) {
                                                               ^
/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtoObs.scala:264: Procedure syntax is deprecated. Convert procedure `writeTo` to method by adding `: Unit =`.
    def writeTo(output: com.google.protobuf.CodedOutputStream) {
                                                               ^
/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtoObs.scala:333: Procedure syntax is deprecated. Convert procedure `registerAllExtensions` to method by adding `: Unit =`.
    def registerAllExtensions(registry: com.google.protobuf.ExtensionRegistryLite) {
                                                                                   ^
/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtobufPrediction.scala:23: Procedure syntax is deprecated. Convert procedure `writeTo` to method by adding `: Unit =`.
    def writeTo(output: com.google.protobuf.CodedOutputStream) {
                                                               ^
/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtobufPrediction.scala:99: Procedure syntax is deprecated. Convert procedure `registerAllExtensions` to method by adding `: Unit =`.
    def registerAllExtensions(registry: com.google.protobuf.ExtensionRegistryLite) {
                                                                                   ^
/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtoObs.scala:162: Unused import
        import com.google.protobuf.ExtensionRegistryLite.{getEmptyRegistry => _emptyRegistry}
                                                          ^
/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtoObs.scala:279: Unused import
        import com.google.protobuf.ExtensionRegistryLite.{getEmptyRegistry => _emptyRegistry}
                                                          ^
/local/dev/odin-core/common/build/scalabuff/generated-sources/ai/osaro/data/ProtobufPrediction.scala:40: Unused import
        import com.google.protobuf.ExtensionRegistryLite.{getEmptyRegistry => _emptyRegistry}
                                                          ^

I wonder if we could ignore warnings in these generated files, or if scalabuff could fix the generated code.