Add HashSet<T> ctors with capacity#2862
Conversation
Adds ctors to HashSet that accept a capacity. New tests are not included due to System.Collections.dll being a partial facade, and the repo not currently having the infrastructure to enable adding tests for new surface area in partial facades.
There was a problem hiding this comment.
I wonder (not tied to this commit) if we should strip Contract.EndContractBlock et al since we're not using the code contract tooling.
There was a problem hiding this comment.
It is something definitely worth considering, to this point I've not seen the value of ripping it all out yet. It may still be somewhat useful if we do get the C# vNext contracts feature in providing some hints about the contracts.
|
LGTM It might be worth merging master -> future and updating the contracts under the new ref/ now that they're part of the repo. It would also be nice to make sure there are (internal) tracking issues to get new surface area backported to desktop. It's not necessary to block on that for this commit, but perhaps we should open an issue to do those things for any changes already in future. cc @weshaggard |
|
CI failed due to future needing to be updated with some recent commits to master. I'll take care of that tomorrow if no one beats me to it. |
|
@nguerrera @stephentoub it is my expectation that at some point when we decide to merge future back to master someone will need to pay the debt of ensuring the new APIs are added to the correct contracts and supported on the appropriate platforms. It is probably worth creating a github issue tracking this merge and listing pointers to the commits/issues that we have accepted in future for easier tracking. I also agree with @nguerrera that we can start adding these APIs into the ref for the given contract which will also aid in identifying public API changes. |
Great. Please do 😉 |
|
@stephentoub I've created item https://github.com/dotnet/corefx/issues/2869 to track the merge of future to master. I will try and do a pass over the existing PR's and add links into the main item there, but please feel free to assist with the links and keeping it updated. |
|
@dotnet-bot test this please |
Add HashSet<T> ctors with capacity
dotnet/corefx#2862 Commit migrated from dotnet/corefx@918201e
Replaces PR #2122. I squashed and fixed up @MarkusSintonen's commits from that PR.
Fixes #382.
New tests are not included due to System.Collections.dll being a partial facade, and the repo not currently having the infrastructure to enable adding tests for new surface area in partial facades.
cc: @terrajobst, @KrzysztofCwalina