-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
repl: Remove magic mode #7850
repl: Remove magic mode #7850
Conversation
IMHO, a message that indicates |
/cc @Fishrock123 PTAL |
For completeness' sake:
...unless you start node with |
Not so sure about this, there could be things that we are missing, or more things like this in the future. Does it really cost us anything to keep it? |
While I'm OK with this in general, it's likely quite premature and could have unintended side effects down the road. Also, a deprecation cycle would be necessary before removing outright. I'd say we hold off on this for now and revisit after v7. |
lib/internal/repl.js
Outdated
@@ -39,11 +39,11 @@ function createRepl(env, opts, cb) { | |||
opts.replMode = { | |||
'strict': REPL.REPL_MODE_STRICT, | |||
'sloppy': REPL.REPL_MODE_SLOPPY, | |||
'magic': REPL.REPL_MODE_MAGIC | |||
'magic': REPL.REPL_MODE_MAGIC, |
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.
Not sure why do this change.
@princejwesley Note that v8 still throws those errors with @jasnell This introduces a (hard) deprecation cycle — it warns when the user passes |
Hm. The deprecation cycle here is a hard deprecation. Perhaps this needs soft (i.e. documentation-only) deprecation first.
|
Note: this was in fact removed even in V8 5.1 branch (in V8 5.1.297). See v8/v8@a0a8ecd, note how it removes the error message. That error message which we are catching in the repl |
Thank you for the clarification! I'd missed that On Sunday, July 24, 2016, Сковорода Никита Андреевич <
|
c133999
to
83c7a88
Compare
Closing in favor of #11599 |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
doc, repl
Description of change
Currently
magic
mode retries the executed command with'use strict';
only when theBLOCK_SCOPED_ERROR
is thrown and v8 is no longer emittingBLOCK_SCOPED_ERROR
.From the v8 4.9 release note,
Also IMHO,
magic
mode is tightly coupled with JS engine's(v8) implementation.