Uh oh!
There was an error while loading. Please reload this page.
repl: improve static import error message in repl - #33588
Conversation
nodejs-github-bot
commented
May 27, 2020
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
8ae28ff to
2935f72Compare94e46ab to
576de38CompareMylesBorins
commented
Jul 20, 2020
I've updated PTAL @BridgeAR I don't think we need to check the length on this. If someone is explicitly messing with the stack size I'm pretty happy that this feature might fail for them. Thoughts? |
There was a problem hiding this comment.
we could alternative find which item in the array starts with SyntaxError rather than by default using the 5th item
There was a problem hiding this comment.
That sounds better to me. There is in fact similar code to determine that line below. It'll only be triggered in case there's no uncaughtException listener though.
There was a problem hiding this comment.
Updated to use regex PTAL
BridgeAR
commented
Jul 21, 2020
Is it not possible to just fix static import? That would be most user friendly and I would rather have that. I guess it might be tricky to implement it though? |
MylesBorins
commented
Jul 21, 2020
@BridgeAR AFAIK there is no way to implement static import in the REPL. I could be wrong, but in lieu of a solution to that this seems like the next best thing. |
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: nodejs#33576
d83bb30 to
4a7fe9aComparenodejs-github-bot
commented
Jul 23, 2020
MylesBorins
commented
Jul 30, 2020
hey @BridgeAR are you ok with this landing? |
MylesBorins
commented
Aug 3, 2020
Pinging @BridgeAR one more time. I'll land in 48 hours if I don't hear anything. |
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588Fixes: #33576 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
commented
Aug 5, 2020
Landed in 861a54c |
| expect: '42' | ||
| }, | ||
| { | ||
| send: 'import comeOn from \'fhqwhgads\'', |
There was a problem hiding this comment.
| send: 'import comeOn from \'fhqwhgads\'', | |
| send: 'import everybody from \'the limit\'', |
There was a problem hiding this comment.
On second thought...
| send: 'import comeOn from \'fhqwhgads\'', | |
| send: 'import theLimit from \'everybody\'', |
There was a problem hiding this comment.
Long descriptive names are preferable.
| send: 'import comeOn from \'fhqwhgads\'', | |
| send: 'import comeOn from \'fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf\'', |
There was a problem hiding this comment.
LOLOLOL
guess this will need to come in a followup
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588Fixes: #33576 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588Fixes: #33576 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588Fixes: #33576 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588Fixes: #33576 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Currently the error is rather ambiguous and does not inform folks that
static import is not supported in the repl. This overrides the default
error message with one that is more informative.
Closes: #33576