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 using latest or other tags as version in package.json #24966

Closed
cshaa opened this issue Aug 9, 2024 · 1 comment · Fixed by #24968
Closed

Bug: panic when using latest or other tags as version in package.json #24966

cshaa opened this issue Aug 9, 2024 · 1 comment · Fixed by #24968
Labels
bug Something isn't working correctly node compat

Comments

@cshaa
Copy link

cshaa commented Aug 9, 2024

Steps to reproduce

  1. Deno v1.45.5 on linux
  2. git clone [email protected]:m93a/typek-clap.git
  3. git checkout 859c56
  4. deno test

Error

thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_semver-0.5.7/src/lib.rs:275:32:
programming error: cannot use matches with a tag: latest

Backtrace

RUST_BACKTRACE=1

Platform: linux x86_64
Version: 1.45.5
Args: ["deno", "test"]

thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_semver-0.5.7/src/lib.rs:275:32:
programming error: cannot use matches with a tag: latest
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: deno_semver::VersionReq::matches
   3: deno_npm::resolution::snapshot::NpmResolutionSnapshot::resolve_best_package_id
   4: deno::npm::managed::resolvers::local::sync_resolution_with_fs::{{closure}}
   5: <deno::npm::managed::resolvers::local::LocalNpmPackageResolver as deno::npm::managed::resolvers::common::NpmPackageFsResolver>::cache_packages::{{closure}}
   6: deno::npm::managed::ManagedCliNpmResolver::cache_packages::{{closure}}
   7: deno::npm::managed::ManagedCliNpmResolver::add_package_reqs_raw::{{closure}}
   8: deno::npm::managed::ManagedCliNpmResolver::add_package_reqs::{{closure}}
   9: deno::npm::managed::ManagedCliNpmResolver::inject_synthetic_types_node_package::{{closure}}
  10: deno::tools::check::TypeChecker::check_diagnostics::{{closure}}
  11: deno::tools::check::TypeChecker::check::{{closure}}
  12: deno::module_loader::ModuleLoadPreparer::prepare_module_load::{{closure}}
  13: deno::graph_container::MainModuleGraphContainer::check_specifiers::{{closure}}
  14: deno::tools::test::check_specifiers::{{closure}}
  15: deno::spawn_subcommand::{{closure}}
  16: <deno_unsync::tokio::task::MaskFutureAsSend<F> as core::future::future::Future>::poll
  17: tokio::runtime::task::raw::poll
  18: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

RUST_BACKTRACE=full

Platform: linux x86_64
Version: 1.45.5
Args: ["deno", "test"]

thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_semver-0.5.7/src/lib.rs:275:32:
programming error: cannot use matches with a tag: latest
stack backtrace:
   0:     0x582c35cf45c5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3692694645b1bb6a
   1:     0x582c35d26f7b - core::fmt::write::h5131d80b4c69b88d
   2:     0x582c35cee69f - std::io::Write::write_fmt::h1fb327a7d8b0eb36
   3:     0x582c35cf439e - std::sys_common::backtrace::print::h998d75b840f75a73
   4:     0x582c35cf5e09 - std::panicking::default_hook::{{closure}}::h18ec7fe6a38b9da0
   5:     0x582c35cf5baa - std::panicking::default_hook::hfb3f22c2e4075a6a
   6:     0x582c362aa93d - deno::setup_panic_hook::{{closure}}::hd5bd3712b479b3db
   7:     0x582c35cf647b - std::panicking::rust_panic_with_hook::h51af00bcb4660c4e
   8:     0x582c35cf61f4 - std::panicking::begin_panic_handler::{{closure}}::h39f76aa863fbe8ce
   9:     0x582c35cf4a89 - std::sys_common::backtrace::__rust_end_short_backtrace::h4d10fc2251b89840
  10:     0x582c35cf5f27 - rust_begin_unwind
  11:     0x582c35d23ec3 - core::panicking::panic_fmt::h319840fcbcd912ef
  12:     0x582c37cdad2f - deno_semver::VersionReq::matches::h609109a5abdc1202
  13:     0x582c366f97cb - deno_npm::resolution::snapshot::NpmResolutionSnapshot::resolve_best_package_id::hf516f178d0c67644
  14:     0x582c3619ac7c - deno::npm::managed::resolvers::local::sync_resolution_with_fs::{{closure}}::h24f6d5cc96399346
  15:     0x582c3631bcc6 - <deno::npm::managed::resolvers::local::LocalNpmPackageResolver as deno::npm::managed::resolvers::common::NpmPackageFsResolver>::cache_packages::{{closure}}::h466f1c60fde4d7b2
  16:     0x582c361a5d16 - deno::npm::managed::ManagedCliNpmResolver::cache_packages::{{closure}}::h30db8214b488357b
  17:     0x582c361a577f - deno::npm::managed::ManagedCliNpmResolver::add_package_reqs_raw::{{closure}}::he67c34a4a3fe2c5a
  18:     0x582c361a4bc1 - deno::npm::managed::ManagedCliNpmResolver::add_package_reqs::{{closure}}::h6292b585483a0df9
  19:     0x582c361a5bea - deno::npm::managed::ManagedCliNpmResolver::inject_synthetic_types_node_package::{{closure}}::h561c3991be6662c8
  20:     0x582c361c11d8 - deno::tools::check::TypeChecker::check_diagnostics::{{closure}}::hfe2a3a7e2e00a49e
  21:     0x582c361c0f60 - deno::tools::check::TypeChecker::check::{{closure}}::hcc4d63815190c47f
  22:     0x582c3618920f - deno::module_loader::ModuleLoadPreparer::prepare_module_load::{{closure}}::ha3a11c0d47a35b71
  23:     0x582c360b5f05 - deno::graph_container::MainModuleGraphContainer::check_specifiers::{{closure}}::h4af288df5565eb8e
  24:     0x582c3626103d - deno::tools::test::check_specifiers::{{closure}}::hb7299e3e3c6982a0
  25:     0x582c362a7233 - deno::spawn_subcommand::{{closure}}::hc7ae1ebdd0fb0b59
  26:     0x582c35d32184 - <deno_unsync::tokio::task::MaskFutureAsSend<F> as core::future::future::Future>::poll::h05588e16c2cf43db
  27:     0x582c35f0d553 - tokio::runtime::task::raw::poll::h86f737e5b969bbc9
  28:     0x582c362ac456 - deno::main::h7b7bc29da04bff7e
  29:     0x582c35ded8ea - std::sys_common::backtrace::__rust_begin_short_backtrace::h85a286d7ffacf7d9
  30:     0x582c35df64dc - std::rt::lang_start::{{closure}}::h34acffd58ea32a71
  31:     0x582c35ce269d - std::rt::lang_start_internal::h63a185b0ddd212e9
  32:     0x582c36342fc5 - main
  33:     0x7d2714c29d90 - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  34:     0x7d2714c29e40 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:392:3
  35:     0x582c34687029 - _start
  36:                0x0 - <unknown>

@marvinhagemeister marvinhagemeister added bug Something isn't working correctly node compat labels Aug 9, 2024
@marvinhagemeister
Copy link
Contributor

Smaller reproduction:

  1. Create package.json with these contents:
{
  "dependencies": {
    "preact": "latest"
  }
}
  1. Run DENO_FUTURE=1 deno install

@marvinhagemeister marvinhagemeister changed the title deno test crashes Bug: panic when using latest or other tags as version in package.json Aug 9, 2024
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 node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants