Use consistent URI <-> FilePath conversion logic
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
In the language server we use the `.GetFileSystemPath()` method frequently, which calls the following: https://github.com/OmniSharp/csharp-language-server-protocol/blob/82583557bee2699762e4e03989be22be02e1fb1b/src/Protocol/DocumentUri.Internal.cs#L260-L298
In the core logic, we use [Uri.LocalPath](https://learn.microsoft.com/en-us/dotnet/api/system.uri.localpath).
Similarly, there is different conversion logic from path -> Uri:
- https://github.com/OmniSharp/csharp-language-server-protocol/blob/82583557bee2699762e4e03989be22be02e1fb1b/src/Protocol/DocumentUri.cs#L442-L483
- https://github.com/Azure/bicep/blob/d5f69a7dd2e38820b1c8af0fc7ca009a406f6c66/src/Bicep.Core/FileSystem/PathHelper.cs#L137-L154
Contributor guide
Assessment
This issue has not been assessed yet.