-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Nested afterEvaluate() calls should not be silently ignored #3411
Comments
I wouldn't expect the hook to be ignored at all. My mental model of I understand this might pose some implementation challenges but let's not settle for a warning without first evaluating the cost of honoring all the requests. |
Good point, @bamboo. I remember bringing this question up a while back, and IIRC the answer back then was that there's a legitimate reason for not executing nested calls. That said, just executing them would also be a way to solve this issue. |
Just faced this while fighting with ordering problems. |
By doing a sort of fixed-point iteration on `notifyAfterEvaluate` until no more `afterEvaluate` listeners are registered. See #3411
By doing a sort of fixed-point iteration on `notifyAfterEvaluate` until no more `afterEvaluate` listeners are registered. See #3411
By doing a sort of fixed-point iteration on `notifyAfterEvaluate` until no more `afterEvaluate` listeners are registered. See #3411
Superseded by #5200. |
Current Behavior
Consider this code:
This now prints:
And the
Inner
part is silently ignored.Expected Behavior
There should be a clear warning saying that an
afterEvaluate {}
hook was added from anotherafterEvaluate {}
hook, and that it has been ignored.Context
The
afterEvaluate {}
hook is used in a lot of ways to work around ordering problems, and it's easy to end up nesting two of them. Debugging such issues can be pretty hard.The text was updated successfully, but these errors were encountered: