Repository navigation
Promisify of method without last argument callback - undefined beahvior #17569
Description
Activity
- addeddocIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.promisesIssues and PRs related to ECMAScript promises.Issues and PRs related to ECMAScript promises.
on Dec 9, 2017 @benjamingr : I'd like to take this up.
@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
good first issuetasks that have been open for only an hour. If it's been open for a week, then fine. But please leave a reasonable amount of time for these to be picked up by actual first-time contributors. Please don't treatgood first issueas the easy pile. It takes away a good first contribution from someone who could use it.Reacted by Benjamin Gruenbaum and Jon MossBy the way, to be clear: Totally go for stuff labeled
help wantedormentor available, but thegood first issuestuff should be left alone unless it's been open for a while. Let actual first-time contributors have an opportunity at those.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/
Reacted by Mithun Sasidharan, Benjamin Gruenbaum and Jon MossAs 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 !
Reacted by Rich Trott@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
util.promisifylanded and it would be great to clarify them and add more examples.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 :)
Reacted by Mithun SasidharanI'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!
Reacted by Benjamin Gruenbaum and Mithun SasidharanReacted by Benjamin Gruenbaum and Mithun Sasidharan@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.
- removedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on Dec 10, 2017 @benjamingr Just submitted a PR with these changes!
- added a commit that references this issue
on Dec 12, 2017 - added a commit that references this issue
on Dec 12, 2017 - added a commit that references this issue
on Jan 8, 2018 - added a commit that references this issue
on Jan 22, 2018
Currently, our documentation states:
However,
undefined behavioris a very "harsh" way to put what happens (since it implies the process can crash) and the behavior is pretty well defined.promisifythrows. https://github.com/nodejs/node/blob/master/lib/internal/util.js#L257-L259promisify.customis 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.