Uh oh!
There was an error while loading. Please reload this page.
doc: documentation of sync methods links now to async methods - #21243
doc: documentation of sync methods links now to async methods#21243iwko wants to merge 7 commits into
Conversation
vsemozhetbyt
left a comment
There was a problem hiding this comment.
Thank you! There are some nits we need to fix)
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
This seems unnecessary given the immediately previous sentence.
There was a problem hiding this comment.
I would greatly prefer we stick with the wording used elsewhere:
This is the synchronous version of [`fs.exists()`][].Trott
commented
Jun 10, 2018
Hi, @iwko! Welcome, and thanks for the pull request! Documentation changes can often attract a lot of review comments. I hope you'll be patient and not be discouraged. Thanks! |
vsemozhetbyt
commented
Jun 10, 2018
cc @joyeecheung to chime in. |
Also I was confused when I got started with fs documentation as well. There are no clear indications that you should click the link to find out more information e.g. about what the arguments actually mean. Just listing arguments without any explanation following by Maybe a better way to fix this would be instead of saying But I guess the point of saying |
Trott
commented
Jun 10, 2018
@joyeecheung Something like that would make sense to me. But given what you wrote, I guess the current version of this is still an improvement. I'll remove my request for changes. This can always be iterated on going forward. @nodejs/documentation |
iwko
commented
Jun 11, 2018
So, should I change my changes to |
vsemozhetbyt
commented
Jun 11, 2018
joyeecheung
commented
Jun 11, 2018
I would say yes, but let's see what other people from @nodejs/fs @nodejs/documentation think. With that style we will lose the emphasis on making the async versions the perferred APIs. |
vsemozhetbyt
commented
Jun 17, 2018
How should we proceed? |
Trott
commented
Jun 18, 2018
I hate to do this but this is more than a week old and has attracted very little attention from @nodejs/documentation so I'm going to do the dreaded @nodejs/collaborators... |
targos
commented
Jun 18, 2018
The text LGTM as is |
davisjam
commented
Jun 19, 2018
@iwko Thank you for this PR! Here are some comments.
We could prefix this document with "The asynchronous version of APIs documents parameters. The synchronous version indicates only the return value and exceptional behavior.". That would only help someone who bothers to read the complete document though. I would prefer merging the two into a single sentence as @Trott proposed: "For detailed information, see the documentation of the asynchronous version of this API:
|
joyeecheung
commented
Jun 23, 2018
iwko
commented
Jun 23, 2018
@joyeecheung Sure thing |
iwko
commented
Jun 23, 2018
@joyeecheung done |
vsemozhetbyt
commented
Jun 23, 2018
There was a problem hiding this comment.
There was a problem hiding this comment.
I am a little confused now. So documentation for fs.chmod() should look like this?
Synchronously changes the permissions of a file. Returns undefined. For detailed information, see the documentation of the asynchronous version of this API: [fs.chmod()][]. See also: chmod(2).
?
iwko
commented
Jun 29, 2018
I've done all changes. What do You think? @vsemozhetbyt@Trott@davisjam@joyeecheung |
davisjam
commented
Jun 29, 2018
@iwko I will have time to look today or tomorrow. |
There was a problem hiding this comment.
Is it worth to completely skip these notes? We usually do not state anything if a function returns undefined.
There was a problem hiding this comment.
Nit: this one should go after the next reference, ABC-wise.
iwko
commented
Jul 8, 2018
When this PR will be merged? |
Trott
commented
Jul 8, 2018
@iwko Can you address the two nits from @vsemozhetbyt? Specifically, there's no need to indicate that Once that's done, we can run CI and probably land this promptly. (There may be an issue with the merge commit recently added to the branch. Our CI setup does not like merge commits, or at least didn't used to. But we'll deal with that when we get there.) |
iwko
commented
Jul 8, 2018
@Trott I've made changes |
vsemozhetbyt
commented
Jul 8, 2018
Trott
commented
Jul 9, 2018
Looks like CI failed because of the merge commit. I've squashed out the merge commit. CI: https://ci.nodejs.org/job/node-test-pull-request-lite/906/ Would probably be good for people who have approved this to look it over again and make sure they still approve. I don't expect anyone to rescind their approval but this has nonetheless gone through substantial evolution. |
iwko
commented
Jul 9, 2018
@vsemozhetbyt@joyeecheung@davisjam@TimothyGu@jasnell Are you still ok with those changes? |
vsemozhetbyt
commented
Jul 9, 2018
Still LGTM) |
Add links to async methods and make wording consistent. PR-URL: nodejs#21243 Refs: nodejs#21197 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jamie Davis <davisjam@vt.edu> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Trott
commented
Jul 9, 2018
Landed in 65208d0. Thanks for the contribution! 🎉 |
Add links to async methods and make wording consistent. PR-URL: #21243 Refs: #21197 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jamie Davis <davisjam@vt.edu> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Documentation of sync methods links now to async methods if it made sense
Checklist
Refs: #21197