Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LspFileChangeWatcher case sensitivity #72555

Merged
merged 4 commits into from
Mar 26, 2024

Conversation

ryzngard
Copy link
Contributor

Change events on windows have come in with a lowercase drive letter (locally observed) and would be disregarded for changing. Change the string comparer to be case insensitive on OSes that are not Linux

@ryzngard ryzngard requested a review from a team as a code owner March 15, 2024 00:04
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 15, 2024
@@ -64,7 +65,8 @@ private class FileChangeContext : IFileChangeContext
/// The list of file paths we're watching manually that were outside the directories being watched. The count in this case counts
/// the number of
/// </summary>
private readonly Dictionary<string, int> _watchedFiles = new Dictionary<string, int>(StringComparer.Ordinal);
private readonly Dictionary<string, int> _watchedFiles = new Dictionary<string, int>(_stringComparer);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure exactly how to add a good test for this, am open to ideas + where it should go

@ryzngard ryzngard enabled auto-merge March 18, 2024 22:38
@ryzngard ryzngard merged commit 0428654 into dotnet:main Mar 26, 2024
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 26, 2024
@ryzngard ryzngard deleted the lspfilewatcher_casesensitivity branch March 27, 2024 21:25
@dibarbet dibarbet modified the milestones: Next, 17.11 P1 Apr 29, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants