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

Feature/pcall protection #123

Merged
merged 13 commits into from
Oct 15, 2024
Merged

Feature/pcall protection #123

merged 13 commits into from
Oct 15, 2024

Conversation

sbrl
Copy link
Owner

@sbrl sbrl commented Oct 12, 2024

This is a WIP PR to implement pcall/xpcall-style protection when running commands for #115. This is significantly more complicated than you think, so this PR is a draft until I'm done.

Still to do:

  • Implement our own encodeURIComponent() cause the one I lifted from SO sucks
  • Try out coroutines (aka like Wren Fibres: https://wren.io/concurrency.html) because we might be able to lift the stack trace like this
  • Tidy up the test implementation so it can be repeated more easily - maybe something like weac.safe_function() to complement safe_region?
  • Finally, apply the approach across the rest of the codebase.

@sbrl sbrl marked this pull request as ready for review October 14, 2024 19:56
@sbrl sbrl merged commit 57d09a7 into dev Oct 15, 2024
2 of 3 checks passed
@sbrl sbrl deleted the feature/pcall-protection branch October 15, 2024 19:15
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.

1 participant