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: conditionally use legacy asyncWrap behavior for Node.js v4 #6

Closed
wants to merge 1 commit into from
Closed

Conversation

timkendrick
Copy link

Reinstates legacy asyncWrap behavior when run on Node.js v4.
Fixes #5 and AndreasMadsen/trace/#24

Reinstates legacy `asyncWrap` behavior when run on Node.js v4.
Fixes #5 and AndreasMadsen/trace/#24
@AndreasMadsen
Copy link
Owner

AndreasMadsen commented Apr 18, 2016

Sorry. it is more complicated than this.

Bump node.js for updating async wrap in Node 4 here: nodejs/Release#86
It is also an overview of all the changes between Node 4 and Node 5.

In any case I'm not going to implement backward compatibility, there are constantly made changes to async_wrap and it is a nightmare to maintain. You can use older versions of async-hook (1.2.0 for node 4) and everything should work.

@AndreasMadsen
Copy link
Owner

Sorry didn't see your message in: AndreasMadsen/trace#24 (comment)

I didn't realize you also made async-hook, impressive work! I'll submit a PR for that package, which reinstates the prior behavior on Node v4 – let me know on that thread if this is a step in the wrong direction.

Thanks for the effort, but I definitely think it is in the wrong direction. In a previous version of async-hook it did have backward compatibility but it was a nightmare to maintain. Since then the distance between Node 4 and Node 5 have only become greater.

I will refer to my original statement.

I have been thinking about removing async-hook from the dependencies list and add an install script, that will download the correct async-hook version automatically. But I'm too busy for that right now. PRs are appreciated.

You could take a look at npm-compat, but it is 3 years old the npm logic may have changed.

@timkendrick
Copy link
Author

OK, thanks for the clarification – I'll see how far I can get with trying to get trace to use an older async-hook version. Thanks for the quick responses!

@AndreasMadsen
Copy link
Owner

Node.js v4.5.0 is now available. This has the latest AsyncWrap API and thus trace should work out of the box.

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.

2 participants