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

No value set for CompressedFileTextQuery / FileSourceRootQuery (1.85.0) #19258

Open
aldanor opened this issue Mar 1, 2025 · 0 comments
Open
Labels
C-bug Category: bug I-panic

Comments

@aldanor
Copy link

aldanor commented Mar 1, 2025

After updating to 1.85.0 (these problems don't seem to occur on 1.84), the following problems seems to start to occur:

  • On startup (neovim / rust-analyzer), it gets stuck in Roots Scanned 1300/1300... for a very long time, like 1min+, before progressing forward (after which this number changes to a different number). Not sure it's related to the issue below but it didn't happen on 1.84.
  • It seems like adding a new module file and then adding it to lib.rs causes rust-analyzer crashes like the following (taken from lsp log):
Panic context:
version: 1.85.0 (4d91de4e 2025-02-17)
request: textDocument/formatting DocumentFormattingParams {
    text_document: TextDocumentIdentifier {
        uri: Url {
            scheme: "file",
            cannot_be_a_base: false,
            username: "",
            password: None,
            host: None,
            port: None,
            path: "/foo/src/utils.rs",
            query: None,
            fragment: None,
        },
    },
    options: FormattingOptions {
        tab_size: 4,
        insert_spaces: true,
        properties: {},
        trim_trailing_whitespace: None,
        insert_final_newline: None,
        trim_final_newlines: None,
    },
    work_done_progress_params: WorkDoneProgressParams {
        work_done_token: None,
    },
}

thread 'Worker' panicked at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/src/tools/rust-analyzer/crates/ra-salsa/src/input.rs:91:32:
no value set for CompressedFileTextQuery(FileId(30703))

stack backtrace:
    0: _rust_begin_unwind 
    1: core::panicking::panic_fmt
    2: <_ as base_db::SourceDatabase>::compressed_file_text::__shim
    3: <base_db::FileTextQuery as ra_salsa::plumbing::QueryFunction>::execute
    4: <ra_salsa::derived_lru::slot::Slot<base_db::FileTextQuery, ra_salsa::derived_lru::AlwaysMemoizeValue>>::execute
    5: <_ as base_db::SourceDatabase>::file_text::__shim
    6: <ide_db::RootDatabase as base_db::SourceDatabase>::file_text
    7: <ide::Analysis>::file_text
    8: rust_analyzer::handlers::request::run_rustfmt
    9: rust_analyzer::handlers::request::handle_formatting
    10: <<stdx::thread::pool::Pool>::spawn<<rust_analyzer::task_pool::TaskPool<rust_analyzer::main_loop::Task>>::spawn<<rust_analyzer::handlers::dispatch::RequestDispatcher>::on_with_thread_intent<false, false, lsp_types::request::Formatting>::{closure#0}>::{closure#0}>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    
Panic context:
version: 1.85.0 (4d91de4e 2025-02-17)
notification: textDocument/didSave

thread 'LspServer' panicked at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/src/tools/rust-analyzer/crates/ra-salsa/src/input.rs:91:32:
no value set for FileSourceRootQuery(FileId(30703))

stack backtrace:
    0: _rust_begin_unwind
    1: core::panicking::panic_fmt
    2: <_ as base_db::SourceRootDatabase>::file_source_root::__shim
    3: <ide::Analysis>::source_root_id
    4: <rust_analyzer::global_state::GlobalState>::on_notification
    5: <rust_analyzer::global_state::GlobalState>::handle_event
    6: rust_analyzer::main_loop::main_loop
    7: rust_analyzer::run_server
❯ rustc -V
rustc 1.85.0 (4d91de4e4 2025-02-17)
❯ rust-analyzer -V
rust-analyzer 1.85.0 (4d91de4e 2025-02-17)
@aldanor aldanor added the C-bug Category: bug label Mar 1, 2025
@lnicola lnicola added the I-panic label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug I-panic
Projects
None yet
Development

No branches or pull requests

2 participants