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

It is not allowed to specify the scala Map type when using proto3 maps #410

Closed
franbh opened this issue Feb 27, 2018 · 3 comments
Closed

Comments

@franbh
Copy link

franbh commented Feb 27, 2018

It would be great if ScalaPB allowed us to specify which type of scala Map is going to be used when declaring proto3 maps. Right now, it is restricted to scala.collection.immutable.Map, but sometimes it is better to use mutable Maps.
Namely, I'm thinking about an option like this:
map<string, string> my_map = 1 (scalapb.field).map_type = "scala.collection.mutable.Map"

WDYT?

@thesamet
Copy link
Contributor

It makes sense to add this. Can you work on a PR? It would be worth exploring if (scalapb.field).collection_type could be used for this rather than adding map_type.

@franbh
Copy link
Author

franbh commented Feb 28, 2018

Sure, I'll try to find some free time and look into it.

@ollyw
Copy link

ollyw commented Jan 17, 2019

Any progress on support for this? I have a similar use case that I would really like to be able to specify (scalapb.field).collection_type = "scala.collection.immutable.SortedMap"

thesamet added a commit that referenced this issue Jan 22, 2019
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