Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite recursion when diffing structs with cycles #58

Closed
wants to merge 1 commit into from

Conversation

stolowski
Copy link

@stolowski stolowski commented Nov 22, 2018

Unlike Format, the Diff 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 of formatter, 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.

@mvo5
Copy link

mvo5 commented Mar 8, 2019

I just hit the same issue, anything I can do to help (test, review, anything...) to move this PR forward? Thanks :)

@mvo5
Copy link

mvo5 commented Aug 12, 2020

I think #64 fixed this now so this can probably be closed now (unless I miss something).

@stolowski stolowski closed this Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants