Store result_ids per language server (#32631)

Follow-up of https://github.com/zed-industries/zed/pull/32403


Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2025-06-12 22:36:08 +03:00 committed by GitHub
parent 1e244f4aff
commit e56a027bea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 186 additions and 151 deletions

View file

@ -21942,6 +21942,7 @@ async fn test_pulling_diagnostics(cx: &mut TestAppContext) {
.downcast::<Editor>()
.unwrap();
let fake_server = fake_servers.next().await.unwrap();
let server_id = fake_server.server.server_id();
let mut first_request = fake_server
.set_request_handler::<lsp::request::DocumentDiagnosticRequest, _, _>(move |params, _| {
let new_result_id = counter.fetch_add(1, atomic::Ordering::Release) + 1;
@ -21973,7 +21974,10 @@ async fn test_pulling_diagnostics(cx: &mut TestAppContext) {
.expect("created a singleton buffer")
.read(cx)
.remote_id();
let buffer_result_id = project.lsp_store().read(cx).result_id(buffer_id, cx);
let buffer_result_id = project
.lsp_store()
.read(cx)
.result_id(server_id, buffer_id, cx);
assert_eq!(expected, buffer_result_id);
});
};