summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-11 21:53:09 -0400
committerGitHub <noreply@github.com>2023-05-11 21:53:09 -0400
commita39263e0670eca5816c7a72b57a51a7ef9bb8198 (patch)
tree1afa3c3a6a71279d2b8710248f2d54a6f8de9d59 /cli
parente0f07ab8cdd007afee14430264f486346ba8447e (diff)
fix(lsp): preload documents when `deno.documentPreloadLimit` changes (#19103)
Diffstat (limited to 'cli')
-rw-r--r--cli/lsp/documents.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs
index 6577d2769..8fd9cdbb2 100644
--- a/cli/lsp/documents.rs
+++ b/cli/lsp/documents.rs
@@ -1170,11 +1170,13 @@ impl Documents {
pub fn update_config(&mut self, options: UpdateDocumentConfigOptions) {
fn calculate_resolver_config_hash(
enabled_urls: &[Url],
+ document_preload_limit: usize,
maybe_import_map: Option<&import_map::ImportMap>,
maybe_jsx_config: Option<&JsxImportSourceConfig>,
maybe_package_json_deps: Option<&PackageJsonDeps>,
) -> u64 {
let mut hasher = FastInsecureHasher::default();
+ hasher.write_hashable(&document_preload_limit);
hasher.write_hashable(&{
// ensure these are sorted so the hashing is deterministic
let mut enabled_urls = enabled_urls.to_vec();
@@ -1215,6 +1217,7 @@ impl Documents {
.and_then(|cf| cf.to_maybe_jsx_import_source_config());
let new_resolver_config_hash = calculate_resolver_config_hash(
&options.enabled_urls,
+ options.document_preload_limit,
options.maybe_import_map.as_deref(),
maybe_jsx_config.as_ref(),
maybe_package_json_deps.as_ref(),