Open plokhotnyuk opened 5 years ago
Hello! Thank you for creating the issue.
I found an other strange behaviour related to the injection of codecs from implicits. In this case the decoder threw an NullPointerException. I created a minimal reproducer project at https://github.com/pityka/report-npe . sbt run
will run a test and (on my side) throws an NPE. Removing the implicit
keyword on line https://github.com/pityka/report-npe/blob/master/src/main/scala/types.scala#L8 solves the NPE.
Here is a placeholder issue which currently gathering requirements for new derivation API. One key idea is about refactoring in such way that injection of codecs can be done without using of impicits.
This issue is created on behalf of @pityka for cases when the same type is used for different codecs generated by the
make
call.Here is an example of a case code generation for sum of types when some its leaf type have an implicitly defined codec:
W/A would be: 1) Do not use
implicit
keyword forleaf1Codec
definition. 2) Split codec derivation to different namespace, like here: