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

fs: Add noop stub for FSWatcher.prototype.start #30160

Closed

Conversation

lholmquist
Copy link
Contributor

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), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

* 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
@nodejs-github-bot nodejs-github-bot added the fs Issues and PRs related to the fs subsystem / file system. label Oct 29, 2019
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 29, 2019
@nodejs-github-bot
Copy link
Collaborator

@@ -174,6 +174,8 @@ FSWatcher.prototype[kFSWatchStart] = function(filename,
}
};

FSWatcher.prototype.start = () => {};
Copy link
Member

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?

Copy link
Contributor Author

@lholmquist lholmquist Oct 29, 2019

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

lib/internal/fs/watchers.js Outdated Show resolved Hide resolved
lib/internal/fs/watchers.js Outdated Show resolved Hide resolved
lholmquist and others added 2 commits October 29, 2019 14:38
Co-Authored-By: Rich Trott <rtrott@gmail.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
@lholmquist
Copy link
Contributor Author

@Trott forgot to mention that i updated the comments with your suggestions

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Nov 5, 2019

addaleax pushed a commit that referenced this pull request Nov 5, 2019
* 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>
@addaleax
Copy link
Member

addaleax commented Nov 5, 2019

Landed in f048105, thanks for the PR!

@addaleax addaleax closed this Nov 5, 2019
MylesBorins pushed a commit that referenced this pull request Nov 17, 2019
* 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>
@BridgeAR BridgeAR mentioned this pull request Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants