-
Notifications
You must be signed in to change notification settings - Fork 506
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
async_hooks in node 8 #739
Comments
cc @ofrobots |
After closer inspection, it seems the problem stems from |
Thanks for the ping @bnoordhuis. I have sporadic time availability due to travel presently – I will take a look when possible. |
Not sure if this is the root cause of the above assert but in nodejs/node#14040 there was a significant change in async hooks API but it was not applied on 8.6.0 (already before) Above PR introduced also a backward compatible APIs. Maybe using this for 8.x allows to introduce async_hooks in NAN already for 8.x and still allow reuse of binaries for all 8.x versions. |
Yes, that partly applies to Node 8.0.0, but is rather easily worked around. I have code which compiles with 8.0.0, but still does not have an execution scope set up and leads to the assert triggering. It seems (almost) all minor versions between 8.0 and 8.5 will need testing and some shimming and conditional compilation to smooth out differences. The javascript API is also affected by changes and renaming, but is out of scope for NAN, apart from getting the tests running correctly.
This seems interesting. I had not thought about using the legacy API in this way, but it might actually work. It might lead to some deprecation warnings, but then again those old versions of Node 8 should not be used anyway, so it could be worth paying that price. |
There were major changes to
async_hooks
between 8.5.0 and 8.6.0.The same setup that works on 8.6.0 and above results in the following assertion on 8.5.0:
../src/node.cc:1379:v8::MaybeLocal<v8::Value> node::MakeCallback(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context): Assertion '(env->current_async_id()) == (asyncContext.async_id)' failed.
Until this is resolved,
async_hooks
will remain disabled for all of Node 8. See #738.The text was updated successfully, but these errors were encountered: