Compute native diagnostics for a single file (pull-mode path). Called directly from the pull handler (`textDocument/diagnostic`) when the cached full diagnostics are stale or missing. Runs both fast and slow collectors synchronously (no debounce) and caches the results. The pull handler reads `diag_last_full` after this returns.
(&self, uri_str: &str)
| 974 | /// caches the results. The pull handler reads `diag_last_full` |
| 975 | /// after this returns. |
| 976 | pub(crate) async fn trigger_diagnostics_for_pull(&self, uri_str: &str) { |
| 977 | // Don't compute diagnostics before initialization is complete. |
| 978 | // The pull handler will return empty results; once `initialized` |
| 979 | // finishes it schedules all open files which populates the cache. |
| 980 | if !self.init_complete.load(Ordering::Acquire) { |
| 981 | return; |
| 982 | } |
| 983 | |
| 984 | if self.should_skip_diagnostics(uri_str) { |
| 985 | return; |
| 986 | } |
| 987 | |
| 988 | let content = { |
| 989 | let files = self.open_files.read(); |
| 990 | match files.get(uri_str) { |
| 991 | Some(c) => c.clone(), |
| 992 | None => return, |
| 993 | } |
| 994 | }; |
| 995 | |
| 996 | // Run the full native diagnostic pipeline (fast + slow), |
| 997 | // cache per-source results, and push assembled diagnostics. |
| 998 | self.publish_diagnostics_for_file(uri_str, &content).await; |
| 999 | } |
| 1000 | |
| 1001 | /// Long-lived background task that processes diagnostic requests. |
| 1002 | /// |
no test coverage detected