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 stack overflow caused by tables with cyclic references #158

Merged
merged 5 commits into from
Mar 11, 2024

Conversation

CompeyDev
Copy link
Contributor

@CompeyDev CompeyDev commented Feb 25, 2024

Minor changes which include handling of cyclic tables.

Closes #156.

Copy link
Collaborator

@filiptibell filiptibell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this only handles direct self references (one level up, one parent) but it's a lot better than our current behavior (crashing) so LGTM 👍 we can expand on it later.


For the future: it would probably be good to refactor this to not be recursive, and do something like give ids to tables and print them out as <table 1> <table 2> etc since a single <self> for all tables (even if they aren't the same table) is very opaque and may be difficult to figure out for a user.

@CompeyDev
Copy link
Contributor Author

Agree! Would you mind fixing the CI (if it's trivial), kind of triggering me a bit lol.

@filiptibell
Copy link
Collaborator

Would you mind fixing the CI

I don't have a windows machine unfortunately and previous attempts haven't worked out 😕 but yeah would be nice to get fixed

@filiptibell filiptibell merged commit 1f211ca into lune-org:main Mar 11, 2024
4 of 5 checks passed
@CompeyDev
Copy link
Contributor Author

Could try my hand at that then, will lyk if I can fix it up.

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.

Lune crashing when printing cyclic table
2 participants