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

Map fields #50

Closed
bagrusss opened this issue Aug 15, 2017 · 7 comments
Closed

Map fields #50

bagrusss opened this issue Aug 15, 2017 · 7 comments

Comments

@bagrusss
Copy link

bagrusss commented Aug 15, 2017

I have message with map field:
message PairsMsg {
...
map<string, string> pairs = 1;
...
}
and got this error
ERROR i.p.c.c.ProtostuffCompilerCli - Unknown option: 'map_entry' [unknown]

@bagrusss bagrusss reopened this Aug 15, 2017
@kshchepanovskyi
Copy link
Member

Are you using custom google/protobuf/descriptor.proto?

@kshchepanovskyi
Copy link
Member

@bagrusss
Copy link
Author

bagrusss commented Aug 18, 2017

No, I have not this option.

@bagrusss
Copy link
Author

Is there any progress on this issue?
When about wait for the support of the map fields?

@kshchepanovskyi
Copy link
Member

@bagrusss
Copy link
Author

I use custom descriptor.proto, but without map_entry option.
Here is an example, when protostuff compiler fails with ERROR i.p.c.c.ProtostuffCompilerCli - Unknown option: 'map_entry' [unknown]

Removing optional string experimental_map_key = 9; provides nothing.

@kshchepanovskyi
Copy link
Member

You must upgrade your descriptor.proto to the new one, which contains map_entry option.
You can take it from https://github.com/google/protobuf/blob/master/src/google/protobuf/descriptor.proto

Your version of this file is old, it comes from protoc version that did not support maps.

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