Conversation
|
has nodejs/help#778 been fixed otherwise in the last 19 days? Can you explain why da1af3d is no longer required? |
benjamingr
left a comment
There was a problem hiding this comment.
Requesting changes so I don't forget this
|
Thanks, cc @bnoordhuis |
Fishrock123
left a comment
There was a problem hiding this comment.
little unsure why some bits were changed?
| if (browserGlobals) { | ||
| setupGlobalTimeouts(); | ||
| setupGlobalConsole(); | ||
| } |
There was a problem hiding this comment.
It is desirable to load the console first for debugging reasons.
There was a problem hiding this comment.
Well that is a bit tricky if we want to instantiate it eagerly without the get call to do the Instantiation because internal/process/stdio has to be loaded first. Would it be fine to move the necessary part up that load stdio and keep the eager instantiation?
| const browserGlobals = !process._noBrowserGlobals; | ||
| if (browserGlobals) { | ||
| // Instantiate eagerly in case the first call is under stack overflow | ||
| // conditions where instantiation doesn't work. |
There was a problem hiding this comment.
The previous commit here still seems valid...?
There was a problem hiding this comment.
Somewhat yes, but it did not fully work as anticipated and therefore I think it is fine to remove the comment. I can add the comment back in if you like though.
lib/internal/bootstrap_node.js
Outdated
| const originalConsole = global.console; | ||
| let console; | ||
| // Setup inspector command line API | ||
| const { addCommandLineAPI, consoleCall } = process.binding('inspector'); |
There was a problem hiding this comment.
needs if (!addCommandLineAPI) return;?
There was a problem hiding this comment.
Oh, you are right, this part should be moved below the if (!consoleCall) statement. That should be sufficient.
| const consoleAPIModule = new Module('<inspector console>'); | ||
| consoleAPIModule.paths = | ||
| Module._nodeModulePaths(cwd).concat(Module.globalPaths); | ||
| addCommandLineAPI('require', makeRequireFunction(consoleAPIModule)); |
There was a problem hiding this comment.
This is frankly unrelated to console instantiation. I'd prefer it to be moved out of console bootstrapping.
There was a problem hiding this comment.
I combined them because it was the only function calling the inspector. But I split them and the inspector part is now separated.
|
@Fishrock123 @TimothyGu PTAL |
|
@nodejs/collaborators PTAL |
|
Since this should actually also fix a bug (see #15008 (comment)) it would be nice to get some reviews. |
|
LGTM if CI is happy |
|
Landed in 4bcb1c3 |
PR-URL: #15111 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: #15111 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs/node#15111 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs/node#15111 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Previously, console had to be compiled in case it was not available but this is no longer necessary - remove it. Refs: nodejs#15111
Previously, console had to be compiled in case it was not available but this is no longer necessary - remove it. PR-URL: nodejs#16212 Refs: nodejs#15111 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Previously, console had to be compiled in case it was not available but this is no longer necessary - remove it. PR-URL: nodejs/node#16212 Refs: nodejs/node#15111 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Previously, console had to be compiled in case it was not available but this is no longer necessary - remove it. PR-URL: nodejs/node#16212 Refs: nodejs/node#15111 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
|
I do not see much benefit to backport this, so I changed the label accordingly. |
Console setup is currently more complicated then it has to be. I refactored it to be more straight forward.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
lib, test