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

Option to change repeated fields collection type from Seq to IndexedSeq #97

Closed
andresch opened this issue Mar 29, 2016 · 3 comments
Closed

Comments

@andresch
Copy link

Is there a way to change the generated collection type from Seq to some other collection type (e.g. IndexedSeq)?

The way I interpret the option scalapb.field.type this allows to set another class for the object type, but not for the collection type.

@thesamet
Copy link
Contributor

@andresch , not now, but it's an easy fix to change the signature. Though, regardless, when you are parsing a message from bytes, ScalaPB actually assigns a Vector (which is an IndexedSeq), so you do get an IndexedSeq at runtime.

Does it resolve your issue, or do you actually need the case class to state IndexedSeq?

@eiennohito
Copy link
Contributor

An option for primitive types to use arrays instead of vectors would be great as well.

@andresch
Copy link
Author

@thesamet sorry for the late reply. The fact that ScalaPB assigns internally a Vector was sufficient knowledge in our case. So no priority from my side. 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

3 participants