Skip to content
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

fix: dynamic import panic #2792

merged 10 commits into from Aug 21, 2019


Copy link

commented Aug 18, 2019


// dyn_import_panic.ts

async function main() {
  const root = `file://${Deno.cwd()}/`;
  await import(root + "foo.js");
  await import(root + "");


This panic occurred only if there was error for 2nd and following dynamic imports.


thread 'tokio-runtime-worker-1' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`', ../../core/
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread 'main' panicked at 'internal error: entered unreachable code', ../../third_party/rust_crates/registry/src/
thread 'tokio-runtime-worker-2' panicked at 'unexpected state while aborting task: Complete', ../../third_party/rust_crates/registry/src/


error: Uncaught SyntaxError: Invalid or unexpected token
► file:///Users/biwanczuk/dev/deno/

1 # deno

CC @ry

@bartlomieju bartlomieju force-pushed the bartlomieju:fix-dynamic_import_panic branch from 57a796d to 8d0ea91 Aug 18, 2019
bartlomieju added 5 commits Aug 18, 2019
@bartlomieju bartlomieju reopened this Aug 19, 2019
core/ Show resolved Hide resolved
tests/043_dyn_import_error.ts Outdated Show resolved Hide resolved
core/ Show resolved Hide resolved
core/ Show resolved Hide resolved
Copy link

left a comment

Marking this with "request changes" so it doesn't get accidentally landed without a test.

ry approved these changes Aug 21, 2019
Copy link

left a comment

LGTM - : )

@ry ry merged commit b764d1b into denoland:master Aug 21, 2019
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
continuous-integration/appveyor/pr AppVeyor build succeeded
license/cla Contributor License Agreement is signed.
@bartlomieju bartlomieju deleted the bartlomieju:fix-dynamic_import_panic branch Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.