-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Windows by handling Url paths correctly. (#136)
Summary: Previous implementation was using `Url.path()` where it should use `Url.to_file_path()` It caused errors like: ``` "Error: `file:///C:/work/bazel_plain/sample.bzl` could not be converted back to a URL\n" ``` More: cameron-martin/bazel-lsp#62 The `Url.path()` is usually `"/" + path to file` which works fine as file path under unix-like systems, but breaks under Windows, where it can be e.g. `"/c:/some/file"`. See https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#syntax Switched to using `Url.to_file_path()` which represents actual file path. In the process: - Enabled back Windows tests that at least for my machine started passing; - In validate() function not converting from Url to LspUrl and back, just returning to client Url passed in the request. Pull Request resolved: #136 Reviewed By: KapJI Differential Revision: D66655476 Pulled By: ndmitchell fbshipit-source-id: b4590fb27348019424e27ee1d12ffe27d86c6f9f
- Loading branch information
1 parent
b85d972
commit 760df74
Showing
5 changed files
with
47 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters