Skip to content

fix: LSP proxy SourceMapCache should not store nil SourceMaps#1294

Merged
a-h merged 2 commits intoa-h:mainfrom
ptrckmllr:main
Dec 31, 2025
Merged

fix: LSP proxy SourceMapCache should not store nil SourceMaps#1294
a-h merged 2 commits intoa-h:mainfrom
ptrckmllr:main

Conversation

@ptrckmllr
Copy link
Copy Markdown
Contributor

@ptrckmllr ptrckmllr commented Nov 8, 2025

Resolves: #1292

This attempts to fix the nil panic by preventing the SourceMapCache to store a nil SourceMap.

By deleting the cache entry for uri if the provided SourceMap is nil, we keep possibly expected behavior that writing a nil SourceMap "clears" the cache somewhat.

Adds basic unit test to check nil robustness of Set.

@a-h a-h merged commit 40d2b42 into a-h:main Dec 31, 2025
4 checks passed
@a-h
Copy link
Copy Markdown
Owner

a-h commented Dec 31, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(lsp): nil pointer dereference in SourceMap

2 participants