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

Look for potential false-positives #1

Open
naugtur opened this issue Aug 25, 2017 · 5 comments
Open

Look for potential false-positives #1

naugtur opened this issue Aug 25, 2017 · 5 comments

Comments

@naugtur
Copy link
Owner

naugtur commented Aug 25, 2017

This library is not exactly what async hooks were designed for. While it's working for a few cases I investigated, there might be some edge cases out there. The worst case scenario being a false positive, where it'd report a function that's not blocking the event loop.

This needs some investigation.

If you're using this library, feel free to discuss examples of functions it detected.

@yocontra
Copy link

yocontra commented Nov 5, 2017

I'm noticing quite a few false positives using babel w/ async await. I think it detects awaiting a function as blocking the loop, not 100% sure.

@naugtur
Copy link
Owner Author

naugtur commented Nov 5, 2017

Interesting... async await should be handled internally by the same hook implementation as promises.
Could you share a simple case to reproduce? I could look into it and if it's not my bug, pass it on to other guys in diagnostics WG.

@pazguille
Copy link

Hey @naugtur. I'm noticing a few false positives when I'm using Promises.

@naugtur
Copy link
Owner Author

naugtur commented Nov 10, 2017

I'm looking forward to gists with examples or failing testcase contributions. My daughter is born in ~2 weeks and my opensource time budget won't allow tracking this down on my own.

@naugtur
Copy link
Owner Author

naugtur commented Nov 12, 2017

Pushed v1.1.0 where I introduced a simple countermeasure for false positives.
Still don't have a good false-positive example to put in tests.

Please check if you see a change in behavior when toggling trimFalsePositives option. I want to test it reasonably before I switch it on by default and bump to v2.0.0.

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

No branches or pull requests

3 participants