-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Handle printing of cyclic structures #1841
Comments
Hmms, this could get confusing What if we did something instead like Notes on this: So a few important notes on this are one in grain given we want good dev x and print anything goes along with that we should try to print it at all costs imo rather then error. two i think any fix to this requires chanign the way |
@spotandjake I don't think having to specify a depth (or having an implicit depth) is great from a DX perspective. I also just tried doing this in node and it gave me
This seems like a pretty good way of handling it imo, you get a reference for what there is a cycle to. Perhaps we could do something similar? |
I like this approach actually. |
Currently attempting to print data that contains cyclic references results in a stack overflow. A minimal example:
Perhaps an error value of
"<data with cyclic reference>"
(or some other more clever way of displaying this data) can be printed instead if a cycle is detected.The text was updated successfully, but these errors were encountered: