-
-
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
feat(stdlib)!: Handle printing of reference cycles #1844
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you able to look into only allocating the vec if needed? If not, it'd probably be worth it to just allocate a vec and reuse it instead of making a new one each time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but see @ospencer's comment
@ospencer I did end up doing something like that; initially the allocated vector box is empty and then the first time that |
I gotcha. We can decide to do that later as a further optimization. And yeah, it could cause some trouble for parallelism. |
2dd7cee
to
738dbbe
Compare
Closes #1841
I used a style of reporting cycles similar to Node.js where references are labeled with numbers whenever there is a cycle. For example: