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

Can't parse simple .proto composite message #16

Closed
kybu opened this issue Nov 5, 2011 · 2 comments
Closed

Can't parse simple .proto composite message #16

kybu opened this issue Nov 5, 2011 · 2 comments

Comments

@kybu
Copy link
Contributor

kybu commented Nov 5, 2011

This simple .proto file does not parse:

message Error {
    optional int32 code = 1;
    optional bytes message = 2;
    optional bytes data = 3;
}


message Request {
    optional Error error = 1;
    optional int32 whatever = 2;
}

It fails with a following error:

protoc --beefcake_out . test.proto        
/home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:232:in `gsub': wrong argument type nil (expected Regexp) (TypeError)
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:232:in `field!'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:202:in `block (2 levels) in message!'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:201:in `each'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:201:in `block in message!'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:174:in `call'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:174:in `indent'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:186:in `message!'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:271:in `block (2 levels) in compile'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:270:in `each'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:270:in `block in compile'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:278:in `call'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:278:in `ns!'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:269:in `compile'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:145:in `block in compile'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:143:in `map'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/lib/beefcake/generator.rb:143:in `compile'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/gems/beefcake-0.3.7/bin/protoc-gen-beefcake:8:in `<top (required)>'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/bin/protoc-gen-beefcake:19:in `load'
        from /home/kybu/.rvm/gems/ruby-1.9.3-p0/bin/protoc-gen-beefcake:19:in `<main>'
--beefcake_out: protoc-gen-beefcake: Plugin failed with status code 1.

Thanks.

@bmizerany
Copy link
Contributor

Released 0.3.8. Please give it another shot.

@kybu
Copy link
Contributor Author

kybu commented Nov 24, 2011

Sry, it took me a while to get it tested. It works now, thanks.

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

2 participants