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

thread 'tokio-runtime-worker' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_graph-0.69.6/src/graph.rs:1525:63: called Option::unwrap() on a None value #22852

Closed
alexgleason opened this issue Mar 12, 2024 · 2 comments · Fixed by #22854
Assignees
Labels
bug Something isn't working correctly

Comments

@alexgleason
Copy link
Contributor

Check CI output here: https://gitlab.com/soapbox-pub/mostr/-/jobs/6369700712

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.41.1
Args: ["/usr/bin/deno", "test", "-A", "--unstable-ffi"]
thread 'tokio-runtime-worker' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba1[500](https://gitlab.com/soapbox-pub/mostr/-/jobs/6369700712#L500)1f/deno_graph-0.69.6/src/graph.rs:1525:63:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@alexgleason
Copy link
Contributor Author

Here it is with RUST_BACKTRACE=1:

Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.41.1
Args: ["/usr/bin/deno", "test", "-A", "--unstable-ffi"]
thread 'tokio-runtime-worker' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba1[500](https://gitlab.com/soapbox-pub/mostr/-/jobs/6369780061#L500)1f/deno_graph-0.69.6/src/graph.rs:1525:63:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:144:5
   3: core::option::Option<T>::unwrap
   4: deno_graph::graph::ModuleGraph::build_fast_check_type_graph
   5: deno::graph_util::ModuleGraphBuilder::build_fast_check_graph
   6: deno::tools::check::TypeChecker::check_diagnostics::{{closure}}
   7: deno::tools::check::TypeChecker::check::{{closure}}
   8: deno::module_loader::ModuleLoadPreparer::prepare_module_load::{{closure}}
   9: <deno::module_loader::CliModuleLoader as deno_core::modules::loaders::ModuleLoader>::prepare_load::{{closure}}
  10: deno_core::modules::recursive_load::RecursiveModuleLoad::prepare::{{closure}}
  11: deno_core::modules::map::ModuleMap::load_dynamic_import::{{closure}}
  12: deno_core::modules::map::ModuleMap::poll_progress
  13: deno_core::runtime::jsruntime::JsRuntime::poll_event_loop
  14: deno_core::runtime::jsruntime::JsRuntime::run_event_loop::{{closure}}
  15: deno_runtime::worker::MainWorker::run_event_loop::{{closure}}
  16: deno::worker::CliMainWorker::evaluate_module_possibly_with_npm::{{closure}}
  17: deno::worker::CliMainWorker::execute_side_module_possibly_with_npm::{{closure}}
  18: <deno_unsync::task::MaskFutureAsSend<F> as core::future::future::Future>::poll
  19: tokio::runtime::task::raw::poll
  20: tokio::runtime::runtime::Runtime::block_on
  21: tokio::runtime::task::raw::poll
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

https://gitlab.com/soapbox-pub/mostr/-/jobs/6369780061

@dsherret dsherret added the bug Something isn't working correctly label Mar 12, 2024
@dsherret dsherret self-assigned this Mar 12, 2024
@dsherret
Copy link
Member

dsherret commented Mar 12, 2024

You can temporarily work around this by using deno test --no-check. I will fix this either today or tomorrow.

nathanwhit pushed a commit that referenced this issue Mar 14, 2024
In addition to the reasons for this outlined by @nayeemrmn in #14877
(which I think are reasons alone to not do this), this simplifies things
a lot because then we don't need to implement the following:

1. Need to handle a JSR module dynamically importing a module within it.
2. Need to handle importing an export of a JSR dep then another export
dynamically loaded later.

Additionally, people should be running `deno check dynamic_import.ts`
instead of relying on this behaviour.

Landing this as a fix because it's blocking people in some scenarios and
the current behaviour is broken (I didn't even have to change any tests
to remove this, which is bad).

Closes #22852
Closes #14877
Closes #22580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants