Skip to content

Add back factory function to fix ReactFiberWorkLoop allocation errors#46

Merged
vocksel merged 1 commit intomainfrom
properly-scoped-locals
Apr 2, 2026
Merged

Add back factory function to fix ReactFiberWorkLoop allocation errors#46
vocksel merged 1 commit intomainfrom
properly-scoped-locals

Conversation

@vocksel
Copy link
Copy Markdown
Contributor

@vocksel vocksel commented Apr 2, 2026

Problem

I was wrong in thinking that a do..end block would be functionally equivalent. Tests passed, but in practice ReactFiberWorkLoop will exceed the 200 allocation limit and start erroring

Solution

To fix this, I've added back the module factory pattern. It's really unfortunate we need two anonymous functions per require, but I think this will serve us well for now. In the future I'm still considering going back to a setfenv approach

@vocksel vocksel marked this pull request as ready for review April 2, 2026 15:47
@vocksel vocksel requested a review from a team as a code owner April 2, 2026 15:47
@vocksel vocksel requested a review from passhley April 2, 2026 15:47
@vocksel vocksel merged commit b8bfd0a into main Apr 2, 2026
5 checks passed
@vocksel vocksel deleted the properly-scoped-locals branch April 2, 2026 15:48
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