Skip to content

Map LSP documents by normalised FilePath#1252

Open
lionel- wants to merge 2 commits into
oak/salsa-15-file-path-refactorfrom
oak/salsa-16-document-wire-url
Open

Map LSP documents by normalised FilePath#1252
lionel- wants to merge 2 commits into
oak/salsa-15-file-path-refactorfrom
oak/salsa-16-document-wire-url

Conversation

@lionel-
Copy link
Copy Markdown
Contributor

@lionel- lionel- commented Jun 3, 2026

Branched from #1251
Progress towards #1212

See #1250 for more context.

  • WorldState now keys documents by normalised FilePath instead of Url. See state.rs. Keying by normalised paths will prevent bugs when matching to paths that don't come from the frontend, e.g. source() paths in user code.

  • The original Url sent by the LSP frontend is stored in Document. This is used in communications with the frontend so that we send back exact byte-for-byte Urls, preventing any file matching bugs that could be caused by our internal normalisation of file paths.

Unlike the DAP which has to deal with paths normalised by R, we never resolve symlinks on the LSP side. All matching is done on FilePath based on pure lexical normalisation of paths.

@lionel- lionel- force-pushed the oak/salsa-16-document-wire-url branch from 10e2102 to f6332d0 Compare June 3, 2026 12:12
@lionel- lionel- force-pushed the oak/salsa-15-file-path-refactor branch from 4ac9528 to e807fd2 Compare June 4, 2026 14:19
@lionel- lionel- force-pushed the oak/salsa-16-document-wire-url branch from f6332d0 to 14bacca Compare June 4, 2026 14:19
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.

1 participant