go: Do not fill out root_uri in initialization params to prevent stale notifications (#25644)

Closes #25381

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-02-26 13:24:27 +01:00 committed by GitHub
parent 39728cfc59
commit c0b6d86c41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,7 +5,7 @@ use futures::StreamExt;
use gpui::{App, AsyncApp, Task};
use http_client::github::latest_github_release;
pub use language::*;
use lsp::{LanguageServerBinary, LanguageServerName};
use lsp::{InitializeParams, LanguageServerBinary, LanguageServerName};
use project::Fs;
use regex::Regex;
use serde_json::json;
@ -373,6 +373,14 @@ impl super::LspAdapter for GoLspAdapter {
filter_range,
})
}
fn prepare_initialize_params(
&self,
mut original: InitializeParams,
) -> Result<InitializeParams> {
#[allow(deprecated)]
let _ = original.root_uri.take();
Ok(original)
}
}
fn parse_version_output(output: &Output) -> Result<&str> {