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.
This commit is contained in:
Nathan Whitaker 2024-04-11 11:33:03 -07:00 committed by GitHub
parent df73db671b
commit 4ab0215727
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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::<Vec<_>>();
let req = TscRequest {
method: "$projectChanged",
args: json!([modified_scripts, new_project_version, config_changed,]),