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

Bug: Panic when running astro's test:node task #23883

Open
marvinhagemeister opened this issue May 18, 2024 · 1 comment
Open

Bug: Panic when running astro's test:node task #23883

marvinhagemeister opened this issue May 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@marvinhagemeister
Copy link
Contributor

marvinhagemeister commented May 18, 2024

Steps to reproduce

  1. Clone https://github.com/withastro/astro
  2. cd into cloned repository
  3. Run pnpm i
  4. Run cd packages/astro
  5. Run DENO_FUTURE=1 deno task test:node

Output:

$ DENO_FUTURE=1 deno  task "test:node"
Warning Ignoring dependency '@astrojs/internal-helpers' in package.json because its version requirement failed to parse: Not implemented scheme 'workspace'
Warning Ignoring dependency '@astrojs/markdown-remark' in package.json because its version requirement failed to parse: Not implemented scheme 'workspace'
Warning Ignoring dependency '@astrojs/telemetry' in package.json because its version requirement failed to parse: Not implemented scheme 'workspace'
Warning Ignoring dependency 'astro-scripts' in package.json because its version requirement failed to parse: Not implemented scheme 'workspace'
Task test:node astro-scripts test "test/**/*.test.js"

============================================================
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: macos aarch64
Version: 1.43.5
Args: ["/Users/marvinh/.deno/bin/deno", "run", "--ext=js", "-A", "/Users/marvinh/dev/oss/astro/packages/astro/node_modules/.bin/../astro-scripts/index.js", "test", "test/**/*.test.js"]

thread 'main' panicked at cli/module_loader.rs:583:7:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Running with RUST_BACKTRACE=full:

internal error: entered unreachable code
stack backtrace:
   0:        0x101e8b340 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0aa20ca08aeb683c
   1:        0x101066818 - core::fmt::write::h168dbafcf35bac68
   2:        0x101e5ef44 - std::io::Write::write_fmt::hdb0dd3f09dcf2281
   3:        0x101e8d47c - std::sys_common::backtrace::print::h57b289e4b951ee17
   4:        0x101e8d1a8 - std::panicking::default_hook::{{closure}}::h783b6c512154ec65
   5:        0x101e8cd68 - std::panicking::default_hook::hcdfa9e1e0f234a4f
   6:        0x100f0f4a8 - deno::setup_panic_hook::{{closure}}::ha2aafdfc350a3ea6
   7:        0x101e8de10 - std::panicking::rust_panic_with_hook::h9aea678ca49d64cf
   8:        0x101e8dba4 - std::panicking::begin_panic_handler::{{closure}}::ha16c3377e66deceb
   9:        0x101e8db34 - std::sys_common::backtrace::__rust_end_short_backtrace::hea8fdda1ea8a4c0e
  10:        0x101e8db28 - _rust_begin_unwind
  11:        0x101064bc0 - core::panicking::panic_fmt::h1cb43b60f5788132
  12:        0x101066544 - core::panicking::panic::h3131e0868b9f8622
  13:        0x100e3fd04 - deno::module_loader::CliModuleLoader<TGraphContainer>::load_prepared_module::h54e65c30bbda6bec
  14:        0x100e40be0 - <deno::module_loader::CliModuleLoader<TGraphContainer> as deno_core::modules::loaders::ModuleLoader>::load::h315a892738e6e2a4
  15:        0x101150c78 - deno_core::modules::recursive_load::RecursiveModuleLoad::register_and_recurse_inner::{{closure}}::hbd56a1988c9938b3
  16:        0x101153f94 - <deno_core::modules::recursive_load::RecursiveModuleLoad as futures_core::stream::Stream>::poll_next::hcdb7cf8647852894
  17:        0x1011c9d58 - deno_core::modules::map::ModuleMap::poll_progress::h8ebce3bee7a40a46
  18:        0x1011c88dc - deno_core::runtime::jsruntime::JsRuntime::poll_event_loop::h12b033846c9a32d3
  19:        0x100d626b8 - deno_core::runtime::jsruntime::JsRuntime::run_event_loop::{{closure}}::h605f18e017994981
  20:        0x100bdfa78 - deno_runtime::worker::MainWorker::run_event_loop::{{closure}}::h9033f81e4625fb29
  21:        0x100ef08fc - deno::worker::CliMainWorker::run::{{closure}}::he2c9cbcac2092a2d
  22:        0x100ebfae0 - deno::tools::run::run_script::{{closure}}::hfc1b6964dbd6bf4d
  23:        0x100ef7a80 - deno::spawn_subcommand::{{closure}}::h0ddab228bd82e21e
  24:        0x100d4a8f8 - <deno_unsync::task::MaskFutureAsSend<F> as core::future::future::Future>::poll::h8fa818a5ceb19cba
  25:        0x100ca85bc - tokio::runtime::task::raw::poll::h01652e7c4a96f760
  26:        0x100f10cec - deno::main::hcbbad7e3542a365a
  27:        0x100c10424 - std::sys_common::backtrace::__rust_begin_short_backtrace::ha44f1b1065dea861
  28:        0x100f7a174 - _main

Version: Deno 1.43.5

@marvinhagemeister marvinhagemeister added the bug Something isn't working label May 18, 2024
@Hasan-Alrimawi
Copy link
Contributor

Hasan-Alrimawi commented May 27, 2024

Hello @marvinhagemeister
I noticed that there is unreachable statement within the "load_prepared_module_or_defer_emit" function in "module_loader.rs" file.
The unreachable statement has a comment: unreachable!(); // Node built-in modules should be handled internally.

Could you please clarify what's meant by "handled internally"? Does it refer to deno itself? If so can you help with pointing out the part of Deno code that should've handled it internally?

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

No branches or pull requests

2 participants