From 80df077746727e7d014971b41d3a25f83045b51c Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Thu, 23 Jun 2022 11:12:49 -0600 Subject: [PATCH] attempt #1 --- cli/lsp/cache.rs | 4 ++++ cli/lsp/language_server.rs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs index 249177a64e..6e213778dc 100644 --- a/cli/lsp/cache.rs +++ b/cli/lsp/cache.rs @@ -210,4 +210,8 @@ impl CacheMetadata { self.cache = http_cache::HttpCache::new(location); self.metadata.lock().clear(); } + + pub fn clear_metadata(&self) { + self.metadata.lock().clear(); + } } diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index fdda1aeecd..2115157a81 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -2816,7 +2816,9 @@ impl Inner { // now that we have dependencies loaded, we need to re-analyze them and // invalidate some diagnostics - self.diagnostics_server.invalidate(&[referrer]); + // self.diagnostics_server.invalidate(&[referrer]); + self.diagnostics_server.invalidate_all(); + self.cache_metadata.clear_metadata(); self.send_diagnostics_update(); self.send_testing_update();