Hello, I was trying to compare two case classes with nested optional structures but it seems that it doesn't work.
For example the following
import com.softwaremill.diffx.Diff.Typeclass
import com.softwaremill.diffx.*
case class Test(id: Int)
case class TestWrap(id: Test)
case class TestWrapWrap(id: Option[TestWrap])
val t1 = TestWrapWrap(Option(TestWrap(Test(1))))
val t2 = TestWrapWrap(Option(TestWrap(Test(2))))
given Typeclass[Test] = Diff.derived
given Typeclass[TestWrap] = Diff.derived
given Typeclass[TestWrapWrap] = Diff.derived
val diff = Diff[TestWrapWrap].ignore(_.id.each.id)
val diffResult = diff(t1, t2)
Hello, I was trying to compare two case classes with nested optional structures but it seems that it doesn't work.
For example the following
should pass but actually fails with:
if we set
then it ignores the optional id and it returns that they are identical