summaryrefslogtreecommitdiff
path: root/cli/lsp/diagnostics.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-08-01 20:49:09 -0400
committerGitHub <noreply@github.com>2023-08-02 00:49:09 +0000
commit1cefa831fd74b14121494045a347024502d74e34 (patch)
treecc7791cf674e427fe4165262db416e6c537e99a3 /cli/lsp/diagnostics.rs
parent36ae37604a0ddab4349df6eb6fafb8ae39fd20fc (diff)
feat(unstable): optional `deno_modules` directory (#19977)
Closes #15633
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r--cli/lsp/diagnostics.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs
index ea2c4e12c..7f65c0948 100644
--- a/cli/lsp/diagnostics.rs
+++ b/cli/lsp/diagnostics.rs
@@ -1302,7 +1302,7 @@ fn generate_deno_diagnostics(
#[cfg(test)]
mod tests {
use super::*;
- use crate::cache::HttpCache;
+ use crate::cache::GlobalHttpCache;
use crate::lsp::config::ConfigSnapshot;
use crate::lsp::config::Settings;
use crate::lsp::config::SpecifierSettings;
@@ -1321,7 +1321,7 @@ mod tests {
location: &Path,
maybe_import_map: Option<(&str, &str)>,
) -> StateSnapshot {
- let cache = HttpCache::new(location.to_path_buf());
+ let cache = Arc::new(GlobalHttpCache::new(location.to_path_buf()));
let mut documents = Documents::new(cache);
for (specifier, source, version, language_id) in fixtures {
let specifier =
@@ -1345,8 +1345,8 @@ mod tests {
documents,
maybe_import_map,
assets: Default::default(),
- cache_metadata: cache::CacheMetadata::new(HttpCache::new(
- location.to_path_buf(),
+ cache_metadata: cache::CacheMetadata::new(Arc::new(
+ GlobalHttpCache::new(location.to_path_buf()),
)),
maybe_node_resolver: None,
maybe_npm_resolver: None,
@@ -1396,7 +1396,7 @@ let c: number = "a";
None,
);
let snapshot = Arc::new(snapshot);
- let cache = HttpCache::new(cache_location);
+ let cache = Arc::new(GlobalHttpCache::new(cache_location));
let ts_server = TsServer::new(Default::default(), cache);
// test enabled
@@ -1489,7 +1489,7 @@ let c: number = "a";
None,
);
let snapshot = Arc::new(snapshot);
- let cache = HttpCache::new(cache_location);
+ let cache = Arc::new(GlobalHttpCache::new(cache_location));
let ts_server = TsServer::new(Default::default(), cache);
let config = mock_config();