Stream: t-compiler/rust-analyzer

Topic: did save failing

Martin Asquino (Nov 25 2020 at 20:42, on Zulip):

Hi there, I'm having some issues with the latest release on saving a file. I'm getting the following log

thread 'main' panicked at 'Invalid notification
Method: textDocument/didSave
 error: missing field `version`', /Users/runner/.cargo/registry/src/
stack backtrace:
   0: _rust_begin_unwind
   1: std::panicking::begin_panic_fmt
   2: lsp_server::msg::Notification::extract::{{closure}}
   3: lsp_server::msg::Notification::extract
   4: rust_analyzer::dispatch::NotificationDispatcher::on
   5: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::handle_event
   6: rust_analyzer::main_loop::main_loop
   7: rust_analyzer::main

I was looking into the lsp-server crate and it seems like it uses lsp-types 0.83.1, while rust-analyzer uses 0.84, which I think introduces a breaking change in regards to 0.83.1 (drops the versioned text document in didSave in favour of the old text document without version).

Is anyone else experiencing this?

Jeremy Kolb (Nov 25 2020 at 20:47, on Zulip):

It's been fixed on master

Jeremy Kolb (Nov 25 2020 at 20:48, on Zulip):

Martin Asquino (Nov 25 2020 at 23:01, on Zulip):

ah cool thank you! :bow:

Last update: Jul 29 2021 at 08:45UTC