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

Safely generate encoders for product type #24

Open
AdrianRaFo opened this issue Nov 8, 2018 · 1 comment
Open

Safely generate encoders for product type #24

AdrianRaFo opened this issue Nov 8, 2018 · 1 comment

Comments

@AdrianRaFo
Copy link
Contributor

Related to #13

There is a problem lied with the meta compiler. More specifically when generating encoders/decoders for product types that depend on other encoders/decoders such as List<String> or Option< List<String>>.

@json data class Friend(val _id: String, val tags: List<String>)
@json data class SpecialFriend(val _id: String, val errorOrTags: Option< List<String>>)

We need to investigate how to safely generate encoders for these product types.

@AdrianRaFo AdrianRaFo mentioned this issue Nov 8, 2018
1 task
@nomisRev
Copy link
Contributor

The same technique as Arrow-generic will have to be applied.

If a Kind<F, A> is detected than something like F.encoder(A.encoder()) should be generated. Taking arity into account.

AFAIK we can currently not verify if F.encoder exists so we cannot provide a better error message and will fallback to the technique we use in arrow-generic.

Swing by Slack for any questions :)

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