In 3.0.0-alpha4, codecs are always covariant, which leads to the following issue:
Make codecs invariant to avoid the problem. You always need to specify the exact type that your codec is handling:
The only place where we need covariance is when we only have an object to deduce the type from:
This is fine because it's handled by a separate accepts method.
For the record, we also considered keeping encoding covariant, and making decoding contravariant:
But that doesn't look like something that would be very useful in practice, so the extra complexity isn't justified.