Pull diagnostics fixes (#32242)

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

* starts to send `result_id` in pull requests to allow servers to reply
with non-full results
* fixes a bug where disk-based diagnostics were offset after pulling the
diagnostics
* fixes a bug due to which pull diagnostics could not be disabled
* uses better names and comments for the workspace pull diagnostics part

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2025-06-06 16:18:05 +03:00 committed by GitHub
parent 508b604b67
commit 380d8c5662
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 272 additions and 109 deletions

View file

@ -105,7 +105,7 @@ async fn test_diagnostics(cx: &mut TestAppContext) {
}
],
version: None
}, DiagnosticSourceKind::Pushed, &[], cx).unwrap();
}, None, DiagnosticSourceKind::Pushed, &[], cx).unwrap();
});
// Open the project diagnostics view while there are already diagnostics.
@ -176,6 +176,7 @@ async fn test_diagnostics(cx: &mut TestAppContext) {
}],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -262,6 +263,7 @@ async fn test_diagnostics(cx: &mut TestAppContext) {
],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -370,6 +372,7 @@ async fn test_diagnostics_with_folds(cx: &mut TestAppContext) {
}],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -468,6 +471,7 @@ async fn test_diagnostics_multiple_servers(cx: &mut TestAppContext) {
}],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -511,6 +515,7 @@ async fn test_diagnostics_multiple_servers(cx: &mut TestAppContext) {
}],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -553,6 +558,7 @@ async fn test_diagnostics_multiple_servers(cx: &mut TestAppContext) {
}],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -566,6 +572,7 @@ async fn test_diagnostics_multiple_servers(cx: &mut TestAppContext) {
diagnostics: vec![],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -607,6 +614,7 @@ async fn test_diagnostics_multiple_servers(cx: &mut TestAppContext) {
}],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -740,6 +748,7 @@ async fn test_random_diagnostics_blocks(cx: &mut TestAppContext, mut rng: StdRng
diagnostics: diagnostics.clone(),
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -928,6 +937,7 @@ async fn test_random_diagnostics_with_inlays(cx: &mut TestAppContext, mut rng: S
diagnostics: diagnostics.clone(),
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -984,6 +994,7 @@ async fn active_diagnostics_dismiss_after_invalidation(cx: &mut TestAppContext)
..Default::default()
}],
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -1018,6 +1029,7 @@ async fn active_diagnostics_dismiss_after_invalidation(cx: &mut TestAppContext)
version: None,
diagnostics: Vec::new(),
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -1100,6 +1112,7 @@ async fn cycle_through_same_place_diagnostics(cx: &mut TestAppContext) {
},
],
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -1239,6 +1252,7 @@ async fn test_diagnostics_with_links(cx: &mut TestAppContext) {
..Default::default()
}],
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -1291,6 +1305,7 @@ async fn test_hover_diagnostic_and_info_popovers(cx: &mut gpui::TestAppContext)
..Default::default()
}],
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,
@ -1393,6 +1408,7 @@ async fn test_diagnostics_with_code(cx: &mut TestAppContext) {
],
version: None,
},
None,
DiagnosticSourceKind::Pushed,
&[],
cx,