Closed joroKr21 closed 6 months ago
@tschuchortdev I tried this out in Kittens and unfortunately it degrades compiler performance significantly (rootJVM/Test/compile
went from ~30s to ~60s). So I think we will have to put it behind an import after all.
Oh, that's too bad, but I guess it can't be avoided. Have you thought about putting an @implicitNotFound
on Generic
parameters to direct the user towards the import? I've just experimented with it a little bit and it seems that the custom error message is simply prepended to the compiler's message "failed to synthesize Generic because Foo is not a case class", meaning the error messages will not be worse in other cases if we add our own hint.
Yes, this would make sense. Although I'm still waiting for a backport of @implicitNotFound
for type aliases: https://github.com/scala/scala3/pull/20275
Looks good to me now.
Fixes #218