Open dubinsky opened 4 months ago
/bounty $75
/attempt #667
with your implementation plan/claim #667
in the PR body to claim the bountyThank you for contributing to zio/zio-schema!
/attempt #667
@varshith257: We appreciate your enthusiasm but since you already have 3 active bounty attempts, we're going to keep this open for other contributors to attempt. 🫡
@jdegoes I think this is not an easy fix. The issue seems for me to be, that our derivation depends on the Mirror
generated from the Scala 3 compiler. But in the case of a trait
as a leave, there is no Mirror
generated it seems. I think we don't need to rely on Mirror
, but that would mean a big refactoring
@987Nabil But it would be good if we move out relying on Mirror. It allows us lot flexibility. But yes, it gonna something big refactoring. Let's wait for @jdegoes thoughts on this
Schema derivation fails when intermediate types with no leaf case objects/classes derived from them are present in the sealed trait (or sealed abstract class) hierarchy.
I can understand failure to derive the schema if the whole hierarchy is empty (no leaf case class/object nodes at all), even though I think it should still work; but failing for the example below seems wrong: