Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with "File name X differs from already included" on Windows
On Sublime Text (and potentially other clients) the paths passed to LSP servers on Windows have upper-case drive letter. So either: - C:\folder\foo or - file:///C:/folder/foo This is problematic with Vetur as it normalizes URI paths received from the client in notifications and requests like "textDocument/completion", "textDocument/didChange" etc. It uses getFileFsPath() utility path to get filesystem path from the URI. But it doesn't do normalization for the filesystem path received through "InitializeParams.rootPath" and then uses that path to initialize the Typescript server. That list (parsedConfig.fileNames in serviceHost.ts) is later used to lookup files passed through other calls and causes issues due to there being duplicate path differing only with drive letter. This issue doesn't reproduce in VSCode as it itself normalizes paths passed to the server and automatically lower-cases the drive letter. Fix by normalizing the path passed through InitializeParams.rootPath. Fixes vuejs#2433
- Loading branch information