Skip to content

Commit ecf936f

Browse files
committed
normalize uri for cache eviction
1 parent a680236 commit ecf936f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/lsp/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,8 @@ func (s *Server) handleDenoRequest(ctx context.Context, params *lsproto.DenoRequ
13791379
for _, fileChange := range params.WorkspaceChange.FileChanges {
13801380
// Clear document cache entry for changed file
13811381
s.deno.documentCacheMu.Lock()
1382-
delete(s.deno.documentCache, fileChange.Uri)
1382+
normalizedUri := lsconv.FileNameToDocumentURI(tspath.NormalizePath(fileChange.Uri.FileName()))
1383+
delete(s.deno.documentCache, normalizedUri)
13831384
s.deno.documentCacheMu.Unlock()
13841385

13851386
filePath := tspath.ToPath(fileChange.Uri.FileName(), s.cwd, true)

0 commit comments

Comments
 (0)