net: remove net.Socket.prototype.listen#13735
Conversation
lib/net.js
Outdated
There was a problem hiding this comment.
Can you remove the extra indentation, and change this line to:
}, 'Socket.prototype.listen() is deprecated.', 'DEP0073');
There was a problem hiding this comment.
The deprecation code should be DEP00XX... the actual value would be assigned when the PR lands
|
Ping @ChALkeR ... is it possible to get some idea of how much this is used? |
|
Not opposed but it's neither broken nor a maintenance hassle, just a wart. |
|
@bnoordhuis would you recommend to document this part instead of deprecating it? Because I think the current situation should be changed one way or the other. |
|
PTAL |
|
@BridgeAR https://github.com/nodejs/node/pull/13735/files#r122780215 still applies I think. |
doc/api/deprecations.md
Outdated
There was a problem hiding this comment.
The deprecation code here should be DEP00XX. The actual number should be assigned when the PR lands.
9388c56 to
3929c94
Compare
|
Comment addressed and rebased |
|
PTAL - we might also still just go ahead and document this instead of deprecating it. |
|
@BridgeAR ... that would be my preference. |
|
I am closing this as I do not really know how to document this as I do not know what it should be used for. If someone knows more, please let me know and I will have a look at it again. |
|
@BridgeAR The idea is that Looking at the code again, I'm pretty sure it's broken (as in: unusable, throws TypeErrors) and has been for a long time so there is no point in deprecating it. It can be removed outright. |
|
@bnoordhuis thanks a lot for the info! And yes, I just checked and the function would simple throw a TypeError when called. Removing seems to be the right thing to do here. |
3929c94 to
12118fd
Compare
The function was never documented and now throws a TypeError if used.
12118fd to
b2fc8da
Compare
|
CI: https://ci.nodejs.org/job/node-test-pull-request/12009/ I've also removed the |
The function was never documented and now throws a TypeError if used. PR-URL: nodejs#13735 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
|
Landed in e17dba7 |
The function was never documented and now throws a TypeError if used. PR-URL: #13735 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
The function was never documented and now throws a TypeError if used. PR-URL: #13735 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Notable change:
* async_hooks:
- deprecate AsyncHooks Sensitive API and runInAsyncIdScope. Neither
API were documented. (Andreas Madsen)
#16972
* deps:
- update nghttp2 to 1.29.0 (James M Snell)
#17908
- upgrade npm to 5.6.0 (Kat Marchán)
#17535
- cherry-pick 50f7455 from upstream V8 (Michaël Zasso)
#16591
* events:
- remove reaches into _events internals (Anatoli Papirovski)
#17440
* http:
- add rawPacket in err of `clientError` event (XadillaX)
#17672
* http2:
- implement maxSessionMemory (James M Snell)
#17967
- add initial support for originSet (James M Snell)
#17935
- add altsvc support (James M Snell)
#17917
- perf_hooks integration (James M Snell)
#17906
* net:
- remove Socket.prototype.write (Anna Henningsen)
#17644
- remove Socket.prototype.listen (Ruben Bridgewater)
#13735
* repl:
- show lexically scoped vars in tab completion (Michaël Zasso)
#16591
* stream:
- rm {writeable/readable}State.length (Calvin Metcalf)
#12857
- add flow and buffer properties to streams (Calvin Metcalf)
#12855
* util:
- allow wildcards in NODE_DEBUG variable (Tyler)
#17609
* zlib:
- add ArrayBuffer support (Jem Bezooyen)
#16042
* Addedew collaborator**
- [starkwang](https://github.com/starkwang) Weijia Wang
* Addedew TSC member**
- [danbev](https://github.com/danbev) Daniel Bevenius
PR-URL: #18069
Notable change:
* async_hooks:
- deprecate AsyncHooks Sensitive API and runInAsyncIdScope. Neither
API were documented. (Andreas Madsen)
#16972
* deps:
- update nghttp2 to 1.29.0 (James M Snell)
#17908
- upgrade npm to 5.6.0 (Kat Marchán)
#17535
- cherry-pick 50f7455 from upstream V8 (Michaël Zasso)
#16591
* events:
- remove reaches into _events internals (Anatoli Papirovski)
#17440
* http:
- add rawPacket in err of `clientError` event (XadillaX)
#17672
* http2:
- implement maxSessionMemory (James M Snell)
#17967
- add initial support for originSet (James M Snell)
#17935
- add altsvc support (James M Snell)
#17917
- perf_hooks integration (James M Snell)
#17906
- Refactoring and cleanup of Http2Session and Http2Stream destroy
(James M Snell) #17406
* net:
- remove Socket.prototype.write (Anna Henningsen)
#17644
- remove Socket.prototype.listen (Ruben Bridgewater)
#13735
* repl:
- show lexically scoped vars in tab completion (Michaël Zasso)
#16591
* stream:
- rm {writeable/readable}State.length (Calvin Metcalf)
#12857
- add flow and buffer properties to streams (Calvin Metcalf)
#12855
* util:
- allow wildcards in NODE_DEBUG variable (Tyler)
#17609
* zlib:
- add ArrayBuffer support (Jem Bezooyen)
#16042
* Addedew collaborator**
- [starkwang](https://github.com/starkwang) Weijia Wang
* Addedew TSC member**
- [danbev](https://github.com/danbev) Daniel Bevenius
PR-URL: #18069
Notable change:
* async_hooks:
- deprecate AsyncHooks Sensitive API and runInAsyncIdScope. Neither
API were documented. (Andreas Madsen)
#16972
* deps:
- update nghttp2 to 1.29.0 (James M Snell)
#17908
- upgrade npm to 5.6.0 (Kat Marchán)
#17535
- cherry-pick 50f7455 from upstream V8 (Michaël Zasso)
#16591
* events:
- remove reaches into _events internals (Anatoli Papirovski)
#17440
* http:
- add rawPacket in err of `clientError` event (XadillaX)
#17672
* http2:
- implement maxSessionMemory (James M Snell)
#17967
- add initial support for originSet (James M Snell)
#17935
- add altsvc support (James M Snell)
#17917
- perf_hooks integration (James M Snell)
#17906
- Refactoring and cleanup of Http2Session and Http2Stream destroy
(James M Snell) #17406
* net:
- remove Socket.prototype.write (Anna Henningsen)
#17644
- remove Socket.prototype.listen (Ruben Bridgewater)
#13735
* repl:
- show lexically scoped vars in tab completion (Michaël Zasso)
#16591
* stream:
- rm {writeable/readable}State.length (Calvin Metcalf)
#12857
- add flow and buffer properties to streams (Calvin Metcalf)
#12855
* util:
- allow wildcards in NODE_DEBUG variable (Tyler)
#17609
* zlib:
- add ArrayBuffer support (Jem Bezooyen)
#16042
* Addedew collaborator**
- [starkwang](https://github.com/starkwang) Weijia Wang
* Addedew TSC member**
- [danbev](https://github.com/danbev) Daniel Bevenius
PR-URL: #18069
|
Didn't land on v6.x, should it be considered for v8.x? |
|
Should this be backported to |
I suggest to deprecate this function. It was never documented even though it was already added in 2011. I am not sure what it was for and maybe @bnoordhuis might have a look as a original reviewer?The function is defunct and shout simply be removed. As it was never documented there should not be a problem about it.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
net