From 4ab0215727be2f2c97e1c7d05b86aa1b93007e3b Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:33:03 -0700 Subject: fix(lsp): Denormalize specifiers before calling `$projectChanged` (#23322) Fixes the regression described in https://github.com/denoland/deno/pull/23293#issuecomment-2049819724. This affected jupyter notebooks, as the LSP was passing in already denormalized specifiers, while the jupyter kernel was not. We need to denormalize the specifiers to evict the proper keys from our caches. --- cli/lsp/tsc.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cli') diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 53a35c484..d62744e03 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -303,6 +303,10 @@ impl TsServer { new_project_version: String, config_changed: bool, ) { + let modified_scripts = modified_scripts + .iter() + .map(|(spec, change)| (self.specifier_map.denormalize(spec), change)) + .collect::>(); let req = TscRequest { method: "$projectChanged", args: json!([modified_scripts, new_project_version, config_changed,]), -- cgit v1.2.3