ScalaBuff
ScalaBuff copied to clipboard
When importing a proto with a package statement ScalaBuff generates incorrect Scala code
Example:
foo.proto:
package foo;
option java_package = "com.company.proto";
message FooMsg {
optional int a = 1;
}
bar.proto:
option java_package = "com.company.proto";
import "foo.proto";
message BarMsg {
optional foo.FooMsg foo = 1;
}
ScalaBuff will correctly generate FooMsg
and BarMsg
under the same package com.company.proto
, and therefore the reference from BarMsg
to FooMsg
should be either unqualified (just FooMsg
) or the full com.company.proto.FooMsg
. However, currently, ScalaBuff emits foo.FooMsg
which does not exist.
Pull request #91 is an attempt to address the issue.
@thesamet, can you confirm that the issue is fixed in 1.4.0? Thanks.
@SandroGrzicic thanks for fixing this. We haven't heard anything for a while, and wanted to have a shot at addressing few other gaps (lenses, one-ofs, custom types), so we started http://trueaccord.github.io/ScalaPB/
Looks good - having more similar projects is always a good thing, especially since your project is using protoc itself instead of having a custom parser as in ScalaBuff. Good luck!