Skip to content

Commit

Permalink
fix(lsp): Denormalize specifiers before calling $projectChanged (de…
Browse files Browse the repository at this point in the history
…noland#23322)

Fixes the regression described in
denoland#23293 (comment).
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.
  • Loading branch information
nathanwhit committed Apr 11, 2024
1 parent df73db6 commit 4ab0215
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/lsp/tsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,]),
Expand Down

0 comments on commit 4ab0215

Please sign in to comment.