Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
repl: disable blocking completions by default#36564
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
addaleax commented Dec 18, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
It’s not okay for the REPL to be blocked for multiple seconds after entering `require('` because the completion is performing blocking fs operations on potentially huge directories. Turning the REPL completion function asynchronous would be the right thing to do here, but unfortunately the way the code is structured doesn’t play well with that (in particular, it breaks the preview feature). Therefore, disable these blocking calls by default. Refs: nodejs#33282 (comment)| configurable: true | ||
| }); | ||
| this.allowBlockingCompletions=!!options.allowBlockingCompletions; |
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.
I’m not publicly documenting this because this is a) supposed to be temporary and b) that would make it semver-minor, and this should be backported to v14.x without the extensive process that the LTS team has for semver-minor commits.
nodejs-github-bot commented Dec 18, 2020
nodejs-github-bot commented Dec 19, 2020
nodejs-github-bot commented Dec 21, 2020
addaleax commented Dec 21, 2020
Landed in 82dd23f |
It’s not okay for the REPL to be blocked for multiple seconds after entering `require('` because the completion is performing blocking fs operations on potentially huge directories. Turning the REPL completion function asynchronous would be the right thing to do here, but unfortunately the way the code is structured doesn’t play well with that (in particular, it breaks the preview feature). Therefore, disable these blocking calls by default. Refs: #33282 (comment) PR-URL: #36564 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>It’s not okay for the REPL to be blocked for multiple seconds after entering `require('` because the completion is performing blocking fs operations on potentially huge directories. Turning the REPL completion function asynchronous would be the right thing to do here, but unfortunately the way the code is structured doesn’t play well with that (in particular, it breaks the preview feature). Therefore, disable these blocking calls by default. Refs: #33282 (comment) PR-URL: #36564 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>It’s not okay for the REPL to be blocked for multiple seconds after entering `require('` because the completion is performing blocking fs operations on potentially huge directories. Turning the REPL completion function asynchronous would be the right thing to do here, but unfortunately the way the code is structured doesn’t play well with that (in particular, it breaks the preview feature). Therefore, disable these blocking calls by default. Refs: #33282 (comment) PR-URL: #36564 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
It’s not okay for the REPL to be blocked for multiple seconds after
entering
require('because the completion is performing blockingfs operations on potentially huge directories. Turning the REPL
completion function asynchronous would be the right thing to do here,
but unfortunately the way the code is structured doesn’t play well
with that (in particular, it breaks the preview feature).
Therefore, disable these blocking calls by default.
Refs: #33282 (comment)
Example:
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes