softwaremill / magnolia

Easy, fast, transparent generic derivation of typeclass instances
https://softwaremill.com/open-source/
Apache License 2.0
754 stars 116 forks source link

magnolia scala2-v1.1.5 made generated type-classes not serializable #487

Closed RustedBones closed 8 months ago

RustedBones commented 10 months ago

Last release of magnolia scala2-v1.1.5 introduced a regression, generating not serializable type-classes:

java.io.NotSerializableException: magnolify.cats.HashDerivationSuite$PartialAssignments$macro$111$1$

See test failures in scala-steward PR

adamw commented 10 months ago

Thanks for the report - can you just double-check that 1.1.4 works fine?

RustedBones commented 10 months ago

We've already updated to 1.1.4 in main. The PR passed on the same tests. I think this is the addition of the new object in a non serializable class that causes the issue as object outer must be serializable.

adamw commented 10 months ago

Releasing 1.1.6 with the problematic PR reverted