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

Update ProjectSystemCache to be case insensitive for _primaryCache #6055

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class ProjectSystemCache : IProjectSystemCache, IDisposable
// 0 - Cache is clean
// 1 - Cache is dirty
private int _isCacheDirty = 0;
private readonly Dictionary<string, CacheEntry> _primaryCache = new Dictionary<string, CacheEntry>();
private readonly Dictionary<string, CacheEntry> _primaryCache = new Dictionary<string, CacheEntry>(StringComparer.OrdinalIgnoreCase);
jgonz120 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was originally comparing ProjectNames. 3d091da#diff-5a34d358c305cf4b9fb65e2fba45c849406b2898a65aa0a75513e41370c2161aR19

ProjectNames.Equals does a case insensitive check over the full name, so this change restores the dictionary to be case insensitive.

private readonly ReaderWriterLockSlim _readerWriterLock = new ReaderWriterLockSlim();

// Secondary index. Mapping from all names to a project name structure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public NuGetUITestCase()
{
}

[Ignore("https://github.com/NuGet/Client.Engineering/issues/2829")]
[TestMethod]
[Timeout(DefaultTimeout)]
public void InstallPackageToWebSiteProjectFromUI()
Expand All @@ -48,7 +47,6 @@ public void InstallPackageToWebSiteProjectFromUI()
CommonUtility.AssertPackageInPackagesConfig(VisualStudio, project, "log4net", "2.0.12", Logger);
}

[Ignore("https://github.com/NuGet/Client.Engineering/issues/2829")]
[TestMethod]
[Timeout(DefaultTimeout)]
public void UpdateWebSitePackageFromUI()
Expand Down
Loading