diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-05-01 11:24:25 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-01 05:54:25 +0000 |
commit | 7f80d90f1c70dfc4f5bb6934e65338817ff265d2 (patch) | |
tree | 041e7226949d2f644b8cbc4f641200b9d55bec7e /cli/lsp/tsc.rs | |
parent | 56bf634fa9721832b605dd91ced5329e0329a8f8 (diff) |
Revert "refactor(lsp): move fields from Documents to LspResolver" (#23626)
This reverts commit 5cae3439912ad60eb2866f3d4372a5fe4d0de957.

Caused a +3.3s regression in one of the LSP benchmarks at
deno.land/benchmarks.
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r-- | cli/lsp/tsc.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 28127c6d7..66e834bc2 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4124,9 +4124,9 @@ fn op_script_names(state: &mut OpState) -> Vec<String> { } // inject these next because they're global - for specifier in state.state_snapshot.resolver.graph_import_specifiers() { - if seen.insert(specifier.as_str()) { - result.push(specifier.to_string()); + for import in documents.module_graph_imports() { + if seen.insert(import.as_str()) { + result.push(import.to_string()); } } @@ -5095,7 +5095,7 @@ mod tests { ) .await; let resolver = LspResolver::default() - .with_new_config(&config, cache.clone(), None, None) + .with_new_config(&config, None, None) .await; StateSnapshot { project_version: 0, |