-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support Sets in FromMappable and ToMappable #40
Comments
I thought sets are already supported by #12? |
Yeah, for |
Ah you're right. Mind give it a try and submit a PR? |
Yeah I plan on doing so 🙂have already defined them in my project and it seems to work. Will raise a PR later today. |
@nevillelyh how are |
It's tested in concrete implementations like https://github.com/nevillelyh/shapeless-datatype/blob/master/avro/src/test/scala/shapeless/datatype/avro/AvroTypeSpec.scala
|
@nevillelyh OK cool, thanks! |
@nevillelyh as soon as I change all the |
Ah....that would be why |
Looked at the PR and this a bit. So basically you want
|
@lacarvalho91 also still curious what's the use case for |
@nevillelyh we're decoding Avro with an array field but its encoded as a |
In that case I'm not sure this is the best place for that logic. By allowing Can you use a plug-in implicit conversion instead? See Also just FYI, the |
OK I can look at defining our own avro type to do it. Your comment about efficiency seems to be about Avro in general, unless I'm misreading that? |
Not it's specifically about this library or shapeless design in general mismatch with Avro. https://github.com/nevillelyh/shapeless-datatype/blob/master/avro/src/main/scala/shapeless/datatype/avro/package.scala#L8 |
@lacarvalho91 Just checking if you've tried my suggestion? |
Hey @nevillelyh sorry about the delay. Yeah we just defined our own avro type. So I guess this can be closed. Thanks for the help! |
This can be achieved the same way as done in #11 which would add support for maps too, however I have found that to be able to use a
Set
I also needed to define aCanBuild[T, Set[T]]
so I guess the same would be true forMap
The text was updated successfully, but these errors were encountered: