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 bug where domains aren't re-entered when handlers are executed #110

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jcheng5
Copy link
Member

@jcheng5 jcheng5 commented Nov 22, 2024

jcheng5 and others added 3 commits November 22, 2024 13:13
It's the one labeled "This tests if promise domain
membership infects subscriptions made in handlers."

The inner handler wasn't ever executing, due to
some kind of circularity I think. Not sure. Now it's
executing but not with the right promise domain
(meaning promise domain reentry isn't happening).
When a handler is subscribed to a promise (using then()
or similar) and a promise domain is active, then when
the handler is invoked, the promise domain should be
made active again. This allows the domain to "infect"
handlers that are registered later, but in the same
scope.
@jcheng5
Copy link
Member Author

jcheng5 commented Nov 22, 2024

WARNING: Some of these async tests can fail and not fail testthat, resulting in blue checks! Example

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.

Tool calls lose async context
1 participant