Skip to content

Generalized "disjoint union" differ (Decouple from Maganolia) #85

@jatcwang

Description

@jatcwang

Currently, sealed trait differ are really intertwined with magnolia.

This needs to change if we want to support Differs for:

  • "disjoint unions"-like types where we don't have access to the underlying subclasses (e.g. circe Json type)
  • Scala 3 union types

Idea:

In generalized disjoint union differ, we perform a test for each possible member of the union (this is akin to pattern matching on subclasses of a sealed trait), and if the test is successful, we will execute the diff function for that subclass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions