Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
repl: display dynamic import version in error message.#48129
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
hemanth commented May 22, 2023 • 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.
aduh95 left a comment
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.
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).
hemanth commented May 23, 2023 • 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.
@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
|
hemanth commented May 23, 2023 • 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.
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'); ```hemanth commented May 27, 2023 • 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.
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 <[email protected]>
Co-authored-by: Jordan Harband <[email protected]>
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 <[email protected]>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 <[email protected]>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 <[email protected]>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 <[email protected]>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 <[email protected]>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 <[email protected]>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 <[email protected]>


Fix for #48084