Uh oh!
There was an error while loading. Please reload this page.
repl: display dynamic import version in error message. - #48129
Conversation
aduh95
left a comment
There was a problem hiding this comment.
Can you please remove the unrelated spacing changes, and ensure we have a test for all types of static import statements as well as tests for when there are more than one statement (e.g. const a=1;import 'url';const b=2).
@aduh95 I ran
update: ha! will fix it. Meanwhile, any idea, why this could happen? Looks like a parse error? |
aduh95
commented
May 23, 2023
|
On ^ That should be because it doesn't even parse till |
hemanth
commented
May 23, 2023
hemanth
commented
May 25, 2023
@aduh95 How come the test passes for: {send: 'import "foo";',expect: ''} |
hemanth
commented
May 27, 2023
@aduh95 Currently stuck with: UncaughtTypeError: baseVisitor[type]isnotafunctionatc(node:internal/deps/acorn/acorn-walk/dist/walk:45:24)atObject.ancestor(node:internal/deps/acorn/acorn-walk/dist/walk:48:7)attoDynamicImport(node:repl:238:13)atDomain.debugDomainError(node:repl:713:62)atDomain.emit(node:events:511:28)atDomain.emit(node:domain:489:12)atfinish(node:repl:949:22)atfinishExecution(node:repl:571:7)atREPLServer.defaultEval(node:repl:660:7)atbound(node:domain:433:15)
|
aduh95
commented
May 27, 2023
That's unlikely, we use npm to download new versions. node/tools/dep_updaters/update-acorn.sh Line 36 in 300f68e |
hemanth
commented
May 27, 2023
acron#L9 reads Also, everything works fine in runkit gist. |
hemanth
commented
May 27, 2023
Ah, indeed it was RE is not being respected? |
Enhance the REPL message for static import error message.
```
> import {foo, bar} from 'moo';
import {foo, bar} from 'moo';
^^^^^^
Uncaught:
SyntaxError: .* dynamic import: const {foo,bar} = await import('moo');
```Build says: ![]() Also, finally looks like we have all the variants covered: ![]() |
aduh95
commented
May 27, 2023
If you push a commit to get rid of all the unrelated space changes, that should trigger a new CI run |
hemanth
commented
May 27, 2023
via email
Ha! The spaces changes came in from lint-fix I presume. …On Sat, May 27, 2023, 8:09 AM Antoine du Hamel ***@***.***> wrote:
If you push a commit to get rid of all the unrelated space changes, that
should trigger a new CI run
—
Reply to this email directly, view it on GitHub
<#48129 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEPC2G3CGRJY4ACLMNOO3XIIKKLANCNFSM6AAAAAAYLC4TYY>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
aduh95
commented
May 27, 2023
That's unlikely, but anyway, you would need to get rid of the unrelated changes to move this forward. |
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.
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.
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.
Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
nodejs-github-bot
commented
Jun 10, 2023
nodejs-github-bot
commented
Jun 10, 2023
nodejs-github-bot
commented
Jun 11, 2023
Landed in 0c875bb |
hemanth
commented
Jun 11, 2023
Enhance the REPL message for static import error message.
```
> import {foo, bar} from 'moo';
import {foo, bar} from 'moo';
^^^^^^
Uncaught:
SyntaxError: .* dynamic import: const {foo,bar} = await import('moo');
```
PR-URL: #48129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>Enhance the REPL message for static import error message.
```
> import {foo, bar} from 'moo';
import {foo, bar} from 'moo';
^^^^^^
Uncaught:
SyntaxError: .* dynamic import: const {foo,bar} = await import('moo');
```
PR-URL: nodejs#48129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>Enhance the REPL message for static import error message.
```
> import {foo, bar} from 'moo';
import {foo, bar} from 'moo';
^^^^^^
Uncaught:
SyntaxError: .* dynamic import: const {foo,bar} = await import('moo');
```
PR-URL: nodejs#48129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>Enhance the REPL message for static import error message.
```
> import {foo, bar} from 'moo';
import {foo, bar} from 'moo';
^^^^^^
Uncaught:
SyntaxError: .* dynamic import: const {foo,bar} = await import('moo');
```
PR-URL: #48129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>ruyadorno
commented
Sep 1, 2023
hi @hemanth this commit is breaking tests on |
hemanth
commented
Sep 1, 2023
Hey @ruyadorno Ill try to backport it, thanks for highlighting! |
Enhance the REPL message for static import error message.
```
> import {foo, bar} from 'moo';
import {foo, bar} from 'moo';
^^^^^^
Uncaught:
SyntaxError: .* dynamic import: const {foo,bar} = await import('moo');
```
PR-URL: #48129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>Enhance the REPL message for static import error message.
```
> import {foo, bar} from 'moo';
import {foo, bar} from 'moo';
^^^^^^
Uncaught:
SyntaxError: .* dynamic import: const {foo,bar} = await import('moo');
```
PR-URL: nodejs/node#48129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>Enhance the REPL message for static import error message.
```
> import {foo, bar} from 'moo';
import {foo, bar} from 'moo';
^^^^^^
Uncaught:
SyntaxError: .* dynamic import: const {foo,bar} = await import('moo');
```
PR-URL: nodejs/node#48129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>


Fix for #48084