Closed stolowski closed 4 years ago
I just hit the same issue, anything I can do to help (test, review, anything...) to move this PR forward? Thanks :)
I think https://github.com/kr/pretty/pull/64 fixed this now so this can probably be closed now (unless I miss something).
Unlike
Format
, theDiff
method doesn't detect cycles and goes into infinite recursion on struct with cycles. This PR attempts to fix it with an approach similiar to that offormatter
, although - I think - in case of diff it's enough to detect cycle on just one side of the diff comparision, as the recursion will stop on the cycle on left side, or on actual difference. The test case contains simple reproducers.