-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Promisify of method without last argument callback - undefined beahvior #17569
Comments
@benjamingr : I'd like to take this up. |
@mithunsasidharan I would request that people who already have multiple commits into the project please not take |
By the way, to be clear: Totally go for stuff labeled If it helps, Here's a list of suggested ways to find good issues/tasks if you've already contributed but aren't sure what to work on next: http://nodetodo.org/next-steps/ |
As you said originally, I think once an issue has been around for longer than a week then it should be open to anyone. Based on reviewing a lot of the good first issues, the difficulty level varies greatly which I think explains why some are getting so little attention. |
@apaprocki @Trott : I've closed the PR. I'll leave it some new users as you've pointed out. I'm working on something else. Thanks ! |
@mithunsasidharan thanks and thanks for understanding - if you'd like ideas for stuff to work on - there is a lot of work and testing to do with async iterators and Node.js - as well as a lot of interesting work to be done. Promise.prototype.finally landed - and we should probably test its behavior with unhandled rejections. The promisify docs (what every method does when promisified) haven't really been touched much since A benchmark for promisify would also be a nice addition - we've done a lot of measurements back before it was landed but we don't currently track performance regressions. If you'd like help with any of those feel free to reach out or just leave a comment :) |
I'd like to take this issue if its still up for grabs! I've never contributed to the node source before but have been looking for ways to get started! |
@ramsgoli sounds great. here is promisify's code and here are the docs Here is the general contributing how-to. Don't hesitate to reach out if you're not sure how to proceed. |
@benjamingr Just submitted a PR with these changes! |
Currently the documentation states that promisify() will result in undefined behavior if bad arguments are passed. This is not necessarily the case, since the behavior is well defined, but just not useful. Fixes: nodejs#17569 (comment)
Currently the documentation states that promisify() will result in undefined behavior if bad arguments are passed. This is not necessarily the case, since the behavior is well defined, but just not useful. PR-URL: #17593 Fixes: #17569 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Currently the documentation states that promisify() will result in undefined behavior if bad arguments are passed. This is not necessarily the case, since the behavior is well defined, but just not useful. PR-URL: #17593 Fixes: #17569 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Currently, our documentation states:
However,
undefined behavior
is a very "harsh" way to put what happens (since it implies the process can crash) and the behavior is pretty well defined.promisify
throws. https://github.com/nodejs/node/blob/master/lib/internal/util.js#L257-L259promisify.custom
is specified but not a function - it throws.It won't do something useful but the behavior is defined.
I think our documentation should be amended to explain that the undefined behavior here isn't "as undefined" as writing out of bounds of a buffer for example.
I'm marking this as "good first issue", and "mentor available" in case someone wants to PR this but isn't sure how and would like guidance.
The text was updated successfully, but these errors were encountered: