repl: deprecate REPLServer.prototype.memory#16242
repl: deprecate REPLServer.prototype.memory#16242lance wants to merge 1 commit intonodejs:masterfrom lance:repl-deprecate-memory
Conversation
cjihrig
left a comment
There was a problem hiding this comment.
Do we have any concept of ecosystem usage? Other than that, LGTM.
lib/repl.js
Outdated
There was a problem hiding this comment.
Nit: I'd use _memory directly to remove yet another wrapper.
There was a problem hiding this comment.
@lpinca If I deprecate like so
REPLServer.prototype.memory = util.deprecate(
_memory,
'REPLServer.memory() is deprecated',
'DEP00XX');then I will need to set self = this in _memory. E.g.
function _memory(cmd) {
self = this;
self.lines = self.lines || [];
self.lines.level = self.lines.level || [];
// ... etc
}
With the current implementation, all internal calls go directly to `_memory()`, bypassing the wrapper altogether. Only those calls to `REPLServer.prototype.memory()` will hit it, and the idea is for this to go away anyway.
**EDIT** Never mind all that. I'll take care of the nit.
There was a problem hiding this comment.
I will address this when landing.
This method is only useful for the internal mechanics of the REPLServer and does not need to be exposed in user space. It was previously not documented, so I believe a Runtime deprecation makes sense.
|
@cjihrig there is this from @ChALkeR from over a year ago. #7619 (comment) So it seems like ecosystem usage is small, but it's hard to know for sure. It's hard for me to understand exactly what users in the ecosystem would be using this method for. It really is an internal implementation detail. |
|
Running a second CI since lots of flakey tests failed on the first: https://ci.nodejs.org/job/node-test-pull-request/10812/ |
|
Still several unrelated failed tests in CI. I'm not going to detail them here because it's quite tedious. But I wonder if CI flakiness is this getting worse. I see this a lot lately. Unless anyone objects, I'm going to go ahead and land this tomorrow in spite of CI failures. |
This method is only useful for the internal mechanics of the REPLServer and does not need to be exposed in user space. It was previously not documented, so I believe a Runtime deprecation makes sense. PR-URL: #16242 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Jeremiah Senkpiel <fishrock123@rocketmail.com>
|
Landed in: 7a29f44 |
This method is only useful for the internal mechanics of the REPLServer and does not need to be exposed in user space. It was previously not documented, so I believe a Runtime deprecation makes sense. PR-URL: nodejs/node#16242 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Jeremiah Senkpiel <fishrock123@rocketmail.com>
This method is only useful for the internal mechanics of the REPLServer and does not need to be exposed in user space. It was previously not documented, so I believe a Runtime deprecation makes sense. PR-URL: nodejs/node#16242 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Jeremiah Senkpiel <fishrock123@rocketmail.com>
This method is only useful for the internal mechanics of the REPLServer
and does not need to be exposed in user space. It was previously not
documented, so I believe a Runtime deprecation makes sense.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
repl, doc