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

Restore deno_core update and fix stack frames #100

Merged
merged 4 commits into from
Jul 19, 2024
Merged

Conversation

kylewlacy
Copy link
Member

This PR restores the deno_core updates from #93 (which was originally reverted in #99), along with a fix to the how stack frames are resolved in scripts

The discussion in #98 has more context, but to summarize:

  1. In deno_core v0.215.0, the function Deno.core.prepareStackTrace was no longer being set and instead defined directly on Error.prepareStackTrace
  2. (1) made it so the script where we were setting Error.prepareStackTrace was wrong, and was just clearing out the prepareStackTrace function instead
  3. To resolve statics like Brioche.glob, the std package uses error stack traces to determine which project to resolve the glob from. This broke due to (2)

The fix was then to just remove the line where we were setting Error.prepareStackTrace. For some reason, this also caused a panic that was resolved by marking op_brioche_stack_frames_from_exception as re-entrant (according to the deno_core docs, this is needed whenever one op calls another op)

This PR also adds a new unit test to validate op_brioche_stack_frames_from_exception (and, indirectly, Error.prepareStackTrace).

@kylewlacy
Copy link
Member Author

@kylewlacy kylewlacy enabled auto-merge (squash) July 19, 2024 03:51
@kylewlacy kylewlacy merged commit 98c29da into main Jul 19, 2024
5 checks passed
@kylewlacy kylewlacy deleted the fix-stack-frames branch July 19, 2024 04:06
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