Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dibarbet
Copy link
Member

@dibarbet dibarbet commented Aug 13, 2024

Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2208409

Issue was caused by #74544

Prior to my change, absolute URIs would ignore case when comparing UNC URIs (default impl of Uri.GetHashCode. However once I manually started comparing AbsolutePaths, case was never ignored (due to the hashcode being different for upper vs lower case strings).

This showed up as an issue in C# DevKit because files in the workspace get added with an upper case drive letter (by devkit project system). But VSCode sends LSP requests always with a lower case drive letter. We'd end up always ignoring the diagnostics requests because we thought the file was not tracked by LSP.

This did not show up as an issue in the C# extension because we populate the workspace there with lower case drive letters (what vscode gives us).

The change here is to use an ignoring case hashcode for absolute path. This will potentially cause collisions if a path exists with both cases, but that is generally rare. We will fallback to the URI implementation of comparison in Equals, which appropriately handles case depending on the kind of URI.

@dibarbet dibarbet requested a review from a team as a code owner August 13, 2024 19:42
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 13, 2024
@dibarbet dibarbet enabled auto-merge August 13, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants