Closed
Description
Hello, first time seeing rust-analyzer crashed on me, so thought it would be nice to at least report the thing. Here are the logs from ~/.local/state/nvim/lsp.log
:
logs
[START][2024-04-15 21:12:34] LSP logging initiated
thread 'LspServer' panicked at /__w/rust-analyzer/rust-analyzer/crates/salsa/src/input.rs:92:32: no value set for FileSourceRootQuery(FileId(17364))
stack backtrace:
0: rust_begin_unwind
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:647:5
1: core::panicking::panic_fmt
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/panicking.rs:72:14
2: <salsa::input::InputStorage<Q> as salsa::plumbing::QueryStorageOps<Q>>::fetch
3: <DB as base_db::SourceDatabaseExt>::file_source_root
4: base_db::change::FileChange::apply
5: hir_expand::change::ChangeWithProcMacros::apply
6: ide_db::apply_change::<impl ide_db::RootDatabase>::apply_change
7: rust_analyzer::global_state::GlobalState::process_changes
8: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::handle_event
9: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::run
10: rust_analyzer::main_loop::main_loop
11: rust_analyzer::run_server
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lsp-server-0.7.6/src/stdio.rs:28:37: receiver was dropped, failed to send a message: "SendError(..)"
stack backtrace:
0: rust_begin_unwind
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:647:5
1: core::panicking::panic_fmt
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/result.rs:1649:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jod-thread-0.1.2/src/lib.rs:33:22: called `Result::unwrap()` on an `Err` value: Any { .. }
stack backtrace:
0: rust_begin_unwind
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:647:5
1: core::panicking::panic_fmt
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/result.rs:1649:5
3: jod_thread::JoinHandle<T>::join
4: stdx::thread::JoinHandle<T>::join
5: rust_analyzer::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
The problem was with "fetching" something-something (building?) "proc-macro" (last notifications from Neovim). I just opened /packages/cli/src/main.rs
from Dioxus and waited for about a minute and then the LSP server suddenly quit.
rust-analyzer version: 0.3.1906-standalone (mason)
rustc version: 1.79.0-nightly (0d8b3346a 2024-04-14)
editor or extension: Neovim v0.9.4 (from release page archive)
relevant settings:
server's settings in mrcjkb/rustaceanvim
settings = {
["rust-analyzer"] = {
check = {
command = "clippy",
},
cargo = {
features = "all",
},
},
},
plugin's version/dependencies
version = "^3", -- Recommended
dependencies = {
"mfussenegger/nvim-dap",
"neovim/nvim-lspconfig",
{ -- For Neovim < 0.10
"lvimuser/lsp-inlayhints.nvim",
opts = { inlay_hints = { highlight = "InlayHint" } },
},
},
export CARGO_HOME="$HOME/.local/share/cargo"
# ~/.local/share/cargo/config.toml
[target.x86_64-unknown-linux-gnu]
rustflags = [
"-C", "link-arg=-fuse-ld=mold",
"-Z", "threads=8",
]
repository link (if public, optional): https://github.com/dioxuslabs/dioxus (/packages/cli/src/main.rs
)