-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
fs: Add noop stub for FSWatcher.prototype.start #30160
fs: Add noop stub for FSWatcher.prototype.start #30160
Conversation
* Motivation: In a previous PR, nodejs#29905, I made this method a private method since it had no value to the user. There was discussion that maybe it should have been a runtime deprecation first, but was ultimatley decided that for this type of method, a noop stub was a better option. This Adds back in the method, but as a noop stub, while also keeping the real implementation private
@@ -174,6 +174,8 @@ FSWatcher.prototype[kFSWatchStart] = function(filename, | |||
} | |||
}; | |||
|
|||
FSWatcher.prototype.start = () => {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding a comment explaining that this is to maximize backward-compatibility for end users but this function should not be documented? Otherwise, someone else might come along later and remove it as unused or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point and makes sense. I'll add a little comment
Co-Authored-By: Rich Trott <rtrott@gmail.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
@Trott forgot to mention that i updated the comments with your suggestions |
* Motivation: In a previous PR, #29905, I made this method a private method since it had no value to the user. There was discussion that maybe it should have been a runtime deprecation first, but was ultimatley decided that for this type of method, a noop stub was a better option. This Adds back in the method, but as a noop stub, while also keeping the real implementation private PR-URL: #30160 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Landed in f048105, thanks for the PR! |
* Motivation: In a previous PR, #29905, I made this method a private method since it had no value to the user. There was discussion that maybe it should have been a runtime deprecation first, but was ultimatley decided that for this type of method, a noop stub was a better option. This Adds back in the method, but as a noop stub, while also keeping the real implementation private PR-URL: #30160 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Motivation: In a previous PR, #29905, I made this method a private
method since it had no value to the user.
There was discussion, #29989, that maybe it should have been a runtime deprecation
first, but was ultimatley decided that for this type of method, a
noop stub was a better option.
This Adds back in the method, but as a noop stub, while also keeping
the real implementation private
I wasn't sure if i should add the tests back in that were removed.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes