maurobalbi / glas

Apache License 2.0
41 stars 2 forks source link

panic! #23

Open cdaringe opened 2 weeks ago

cdaringe commented 2 weeks ago

problem

glas dies on casual editting

[Error - 7:46:14 PM] Request textDocument/semanticTokens/range failed.
  Message: Panicked in textDocument/semanticTokens/range: called `Option::unwrap()` on a `None` value
Location: crates/ide/src/ty/infer.rs:73:28
Backtrace:    0:        0x10297404c - std::backtrace::Backtrace::create::hfe9b0c8b0decb4ab
   1:        0x1026baff8 - glas::server::with_catch_unwind::{{closure}}::{{closure}}::h011b2297043d86a1
   2:        0x102980144 - std::panicking::rust_panic_with_hook::h9b82bdc13ccb171b
   3:        0x10297fed4 - std::panicking::begin_panic_handler::{{closure}}::hf609a05c98725eb7
   4:        0x10297e87c - std::sys_common::backtrace::__rust_end_short_backtrace::hea0399d584786a2b
   5:        0x10297fc88 - _rust_begin_unwind
   6:        0x1029cc8ac - core::panicking::panic_fmt::hb4d79f470bcac176
   7:        0x1029cc934 - core::panicking::panic::h200a44837950e7c1
   8:        0x1029cc830 - core::option::unwrap_failed::h99ae810f9cb8e26d
   9:        0x10292e5c8 - ide::def::hir::Local::ty::h0821ce4b439e2d67
  10:        0x1028d3628 - core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::h8cdfbdc5c042d443
  11:        0x1028cb64c - <core::iter::adapters::filter_map::FilterMap<I,F> as core::iter::traits::iterator::Iterator>::next::hbf367b77afb14868
  12:        0x1028d1d30 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h62d39df5204a4195
  13:        0x1028d9184 - ide::ide::semantic_highlighting::highlight::hc0e959ab6636565a
  14:        0x1028c7340 - salsa::Cancelled::catch::h0d4f15666fa4a140
  15:        0x1028c15f4 - ide::ide::Analysis::syntax_highlight::hc2a0b7e89f6c2a3d
  16:        0x102731450 - glas::handler::semantic_token_range::h849fb8a2c0a5a690
  17:        0x1026ba278 - glas::server::with_catch_unwind::hc4d72faa76c3ce05
  18:        0x1026fdbb8 - tokio::runtime::task::core::Core<T,S>::poll::h0d25ebbda1e22aa2
  19:        0x1026ee3b8 - tokio::runtime::task::harness::Harness<T,S>::poll::h68c7ef79021ecf1d
  20:        0x10280bd30 - tokio::runtime::blocking::pool::Inner::run::hcb46ad0008e9644f
  21:        0x10280ed88 - std::sys_common::backtrace::__rust_begin_short_backtrace::h662079a47ac8f7d6
  22:        0x102806380 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h92f3939abd732dbd
  23:        0x102983d1c - std::sys::pal::unix::thread::Thread::new::thread_start::h028c70d4ad289ac9
  24:        0x18af26f94 - __pthread_joiner_wake

  Code: -32603