SandroGrzicic / ScalaBuff

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

value parseDelimitedFrom is not a member of object #103

Open GildedHonour opened 9 years ago

GildedHonour commented 9 years ago

An error in the version 1.3.8, sbt 0.12.4, scala 2.10.4

Error:(109, 41) value parseDelimitedFrom is not a member of object my_app123.MyClass
  private def readClass123() = MyClass123.parseDelimitedFrom(in).getOrElse(throw new Exception("No server response"))

And in .proto file I have this:

//.........
message MyClass123 {
  // .....
  optional MsgCode aaa1 = 1;
  optional MavlinkMsg bbb2 = 2;

}

//.........

And this is what it generates:

//.....

object MyClass123 {
    @reflect.BeanProperty val defaultInstance = new MyClass123()

    val AAA1_FIELD_NUMBER = 1
    val BBB2_FIELD_NUMBER = 2

  //..........
}

There're no methods such as "parseDelimitedFrom"

SandroGrzicic commented 9 years ago

That's weird - a parseDelimitedFrom should always be generated on the companion object. Can you try 1.4.0 and see if you still have the issue? Thanks.