Uh oh!
There was an error while loading. Please reload this page.
net: remove usage of require('util') - #26807
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Use `require('internal/util/inspect').inspect` and `require('internal/util/debuglog').debuglog` instead of `require('util').debuglog` and `require('util').inspect`.
Refs: nodejs#26546BridgeAR
commented
Mar 22, 2019
|
Use `require('internal/util/inspect').inspect` and
`require('internal/util/debuglog').debuglog` instead of
`require('util').debuglog` and `require('util').inspect`.
PR-URL: nodejs#26807
Refs: nodejs#26546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>BridgeAR
commented
Mar 25, 2019
This broke master (likely due to a different change that landed in the meanwhile that conflicts with this one) and I had to pull it out again. @dnlup would you be so kind and rebase this and to take another look? Thanks! |
Trott
commented
Mar 25, 2019
This commit is still in master and the test is still broken. I'll open a fast-track revert unless somebody else is already doing that. And if we get a fix in before we revert, cool. And if not, we can re-land later. |
dnlup
commented
Mar 25, 2019
@BridgeAR Yes, no problem |
@BridgeAR Rebasing I get this error in which I think it is caused by using instead of which sets the |
BridgeAR
commented
Mar 26, 2019
dnlup
commented
Mar 26, 2019
@BridgeAR I would change this too if you're ok with it constinternalUtil=require('internal/util');to const{ deprecate }=require('internal/util');since deprecate is the only function used in this module. |
BridgeAR
commented
Mar 26, 2019
@dnlup sure, go ahead. |
dnlup
commented
Mar 26, 2019
@BridgeAR So I rebased master again, modified the test and it looks good. Only thing is that I should |
BridgeAR
commented
Mar 26, 2019
@dnlup thanks. Normally it would absolutely be fine to force push but I would rather have a new PR for this since I messed up removing the original commit (I pushed to my fork instead of to upstream) and it was instead reverted. So this PR is still referenced by the commit and it should actually be closed and ideally another PR would be opened. |
dnlup
commented
Mar 26, 2019
Closing in favour of #26920 |
Use `require('internal/util/inspect').inspect` and
`require('internal/util/debuglog').debuglog` instead of
`require('util').debuglog` and `require('util').inspect`.
PR-URL: nodejs#26807
Refs: nodejs#26546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Use
require('internal/util/inspect').inspectandrequire('internal/util/debuglog').debugloginstead ofrequire('util').debuglogandrequire('util').inspect.Refs: #26546
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes