Azure / Azure/bicep

Use consistent URI <-> FilePath conversion logic

Open
#11,833 1 comment 0 reactions 1 assignee Claimed by @shenglol View on GitHub
tech debt
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.