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

When importing a proto with a package statement ScalaBuff generates incorrect Scala code #85

Open
thesamet opened this issue Jul 21, 2014 · 4 comments

Comments

@thesamet
Copy link

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.

@xflin
Copy link

xflin commented Sep 25, 2014

Pull request #91 is an attempt to address the issue.

@SandroGrzicic
Copy link
Owner

@thesamet, can you confirm that the issue is fixed in 1.4.0? Thanks.

@thesamet
Copy link
Author

@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/

@SandroGrzicic
Copy link
Owner

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!

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

3 participants