async_hooks: eliminate require side effects#40782
Conversation
|
Is this related to https://twitter.com/evanhlucas/status/1458192210382528518 ? |
|
I had a quick look because of that. As far as I can tell this shouldn't trigger that though. I just saw a thing in looking back at the code that could be improved. |
This comment has been minimized.
This comment has been minimized.
|
Does it make sense to add a test? |
|
Not sure how you'd even test it given that it's functionally identical other than just setting the trampoline function a little later and clearing it if the hooks are disabled. Do we have prior art on testing these environment fields? I guess it'd need to be a native test. In any case, I'll be travelling for the next week so I can either deal with that after I get back or we can land as-is. I'm good either way as it's not really any substantial/important change. |
PR-URL: nodejs#40782 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
15a34d4 to
689405c
Compare
|
Landed in 689405c |
PR-URL: #40782 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
PR-URL: #40782 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
PR-URL: #40782 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Just a minor improvement to avoid any unintended side effects to requiring async_hooks.
cc @nodejs/async_hooks