dotnet / dotnet/msbuild

Clean up HashSet.cs copy

Open
#7,340 2 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 6h
Merged PRs (30d)
139

Description

We have a partial copy of HashSet as it existed in the .NET Framework circa 2008 or something, with the following comment:
https://github.com/dotnet/msbuild/blob/6a79376cc50e5f0d829475adc418e7078776ccb7/src/Build/Collections/RetrievableEntryHashSet/HashSet.cs#L19-L39

The rationale for this odd pattern of fragmented dead code was to diff for future updates to HashSet -- but the live copy of HashSet [here](https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs) has since changed so substantially that it can likely hardly be diffed at all.

As a matter of healthy cleanup, I suggest to delete all the dead code.

There have also been several improvements to HashSet since the copy was done, for perf reasons - either obvious ones or to produce better codegen. It would be nice to copy them (again, without bringing dead code) for some small perf wins. I expect this will be fairly easy to do by eyeballing them side by side.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.