-
Notifications
You must be signed in to change notification settings - Fork 30k
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
util: inspect - remove very old legacy args #22751
Conversation
Undocumented, and refactored 6 years ago Refs: nodejs@07774e6
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.
This is still used a lot in the wild.
@refack sadly an error occured when I tried to trigger a build :( |
I would also like to remove those but before that, we definitely have to add a) a runtime deprecation and b) make sure we open a couple PRs for modules that use the old notation. Using Gzemnid works well for finding those. I am +1 on changing this to a runtime deprecation. |
FWIW it was documented at one point, just a long time ago (v0.8.x seems to the the last branch that had it documented). |
Found this very old legacy compatibility code. I'm seeking feedback on deprecation policy before digging in. Lines 262 to 263 in e039524
this is "internal" and does not need deprecation. |
In that case could we jump straight to runtime deprecation? |
I disagree on calling it internal as it was a publicly documented signature, however at the time the documentation was changed, there was no mechanism in place to deprecate a specific function signature. If we are going to officially deprecate it, I would rather start with a documentation deprecation as I'm sure there are people still using this signature (myself included as it it's easier/faster to type and more succinct). The other choice is to re-document it. |
@mscdex IMHO a documentation deprecation would be the opposite of what we would want to achieve: this is current not documented at all. Therefore adding a doc only deprecation would actually mean we have to add that part to the docs or no one would ever stumble upon it. Thus, I am definitely only +1 for a runtime deprecation. Otherwise we can just keep it as is. |
@BridgeAR We've document-deprecated "private" properties/methods before and those were never documented. I don't see why document-deprecating something that was once publicly documented to be a problem. |
Found the last reference it's in:
We could add a line saying:
I'd recommend we add this now, and a runtime in 11. That should get TSC approval. |
See #22753 |
for (var i = 0; i < optKeys.length; i++) { | ||
ctx[optKeys[i]] = opts[optKeys[i]]; | ||
if (options !== undefined) { | ||
if (typeof options !== 'object') { |
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.
"options" can be null also
Seems there is consesouns to document instead. Refs: #23205 |
Undocumented, and refactored 6 years ago
Refs: 07774e6
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes