Problem
On Windows, LSP executables discovered through canonicalized lsp_paths_extra directories can be represented as extended-length (\\?\\...) paths. Passing a .cmd or .bat shim in that namespace to cmd.exe breaks npm shim %~dp0 handling and the server fails to start with The system cannot find the path specified.
Native .exe launches are unaffected. The path should remain canonical for internal identity and filesystem operations.
Proposed design
At the shared batch-launch boundary only, translate recognized canonical paths into the spelling cmd.exe supports:
\\?\\C:\\... -> C:\\...
\\?\\UNC\\server\\share\\... -> \\server\\share\\...
- preserve unsupported verbatim namespaces unchanged.
This applies equally to npm LSP shims and formatter/tool shims, while leaving native executable launching unchanged.
Evidence
The installed yaml-language-server@1.24.0 fails through the AFT configure + LSP-inspect path before conversion and starts successfully once the batch launch argument is converted at this boundary.
Implementation
PR #293 implements the change with DOS, UNC, percent-character, space, and unsupported-namespace regression coverage.
Problem
On Windows, LSP executables discovered through canonicalized
lsp_paths_extradirectories can be represented as extended-length (\\?\\...) paths. Passing a.cmdor.batshim in that namespace tocmd.exebreaks npm shim%~dp0handling and the server fails to start withThe system cannot find the path specified.Native
.exelaunches are unaffected. The path should remain canonical for internal identity and filesystem operations.Proposed design
At the shared batch-launch boundary only, translate recognized canonical paths into the spelling
cmd.exesupports:\\?\\C:\\...->C:\\...\\?\\UNC\\server\\share\\...->\\server\\share\\...This applies equally to npm LSP shims and formatter/tool shims, while leaving native executable launching unchanged.
Evidence
The installed
yaml-language-server@1.24.0fails through the AFT configure + LSP-inspect path before conversion and starts successfully once the batch launch argument is converted at this boundary.Implementation
PR #293 implements the change with DOS, UNC, percent-character, space, and unsupported-namespace regression coverage.