-
Notifications
You must be signed in to change notification settings - Fork 238
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
Remove auto-derivation enabled by default #657
Comments
I think this is a good idea but the focus should go into 5.0 which will be for Scala 3. |
Given the nature of the change being a breaking change, I think it is fair :) Thanks! I haven't become familiar with scala 3 yet, but If I can help let me know! |
So, just to make sure I'm on the same page.
And auto is when you just request |
Yeah, pretty much, I would say: Semiauto is where you define your typeclass instances in the companion object (usually) by calling the And at the calling site, e.g.:
|
Yea, this one bit me too. I spent days trying to figure out why the |
I could like to +1 this too. I had a use case where the schema and derived case classes did not match (think metadata w/o a shared superclass or typeclass, where some fields belong to the case class and some come from elsewhere) and the only way I saw to implement what is basically Perhaps there is a better way I'm not seeing, but since |
Hi there,
This might be a bit controversial, but auto-derivation is bringing quite a few non-small problems to us, from increased compilation times, to inadvertently, codifying case class that weren't expected to be there.
We are defining the Codecs/SchemaFor explicitly, and that helps, but it's inconvenient to not have the help of the compiler to tell you which one is missing because the missing ones are auto generated.
I would rather have explicit imports for the required behaviour, like circe or zio-json:
import com.sksamuel.avro4s.derivation.auto._
import com.sksamuel.avro4s.derivation.semi._
I am aware if accepted this is a breaking change, but If accepted, I would be willing to put forward a PR.
The text was updated successfully, but these errors were encountered: