Open anthony-c-martin opened 1 year ago
Had an offline discussion on this. The consensus is to maintain a port of DocumentUri
in Bicep.Core
to ensure consistent URI type conversion logic. In the future, the Omnisharp language server library may get deprecated and replaced by another language server SDK. Maintaining our own copy makes it less expensive for us to do the migration.
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-L298In the core logic, we use Uri.LocalPath.
Similarly, there is different conversion logic from path -> Uri: