Stream: t-compiler/rust-analyzer

Topic: Panic in VFS

Jonas Schievink [he/him] (Jun 26 2020 at 14:01, on Zulip):

I'm playing around with analysis-bench and and hit this VFS assertion:

thread 'main' panicked at 'assertion failed: res.pop()', crates/vfs/src/
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/
   4: core::fmt::write
             at src/libcore/fmt/
   5: std::io::Write::write_fmt
             at src/libstd/io/
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/
   9: std::panicking::default_hook
             at src/libstd/
  10: std::panicking::rust_panic_with_hook
             at src/libstd/
  11: std::panicking::begin_panic
  12: vfs::vfs_path::VfsPath::join
  13: vfs::file_set::FileSet::resolve_path
  14: <ra_db::FileLoaderDelegate<&T> as ra_db::FileLoader>::resolve_path
  15: <ra_ide_db::RootDatabase as ra_db::FileLoader>::resolve_path
  16: ra_hir_def::nameres::mod_resolution::ModDir::resolve_declaration

@matklad any idea what could be causing this?

matklad (Jun 26 2020 at 14:05, on Zulip):

Huh, so this means that something is trying to get a parent of an empty path

matklad (Jun 26 2020 at 14:06, on Zulip):

We probably should resoved unresolved module in this case, but we probably shouldn't do this in the frist place...

Last update: Jul 28 2021 at 03:30UTC