dsymonds / gotoc

Protocol Buffer compiler written in Go
Other
120 stars 8 forks source link

fails to parse file-level options #2

Open awalterschulze opened 9 years ago

awalterschulze commented 9 years ago

It seems like it is still struggling to parse extensions.

$ gotoc puddingmilkshake.proto puddingmilkshake.proto:7: got "gogoproto.populate_all", want "="

It should probably give some import error about not being able to find the import for import "github.com/gogo/protobuf/gogoproto/gogo.proto";

Here is a link to the file. https://github.com/katydid/katydid/blob/master/asm/test/puddingmilkshake.proto

dsymonds commented 9 years ago

That's not an extension. It's a file-level option. Yes, that isn't parsed yet.

awalterschulze commented 9 years ago

Ok sorry, I think of it as an extension on the file options.

dsymonds commented 9 years ago

That's fine. It's precision terminology because these are all overlapping concepts. Custom options are implemented as extensions to specific descriptor messages.

tv42 commented 4 years ago

The really nasty consequence of this is that gotoc can't set the generated Go package name.

option go_package = "foo";