Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Capacity property and overloaded TrimExcess#85877

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
eiriktsarpalis merged 17 commits intodotnet:mainfromhrrrrustic:issue-66426
Nov 22, 2023

Conversation

hrrrrustic
Copy link
Contributor

Close#66426

@ghostghost added community-contributionIndicates that the PR has been added by a community member area-System.Collections new-api-needs-documentation labelsMay 6, 2023
@ghost
Copy link

Note regarding thenew-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

Tagging subscribers to this area: @dotnet/area-system-collections
See info inarea-owners.md if you want to be subscribed.

Issue Details

Close#66426

Author:hrrrrustic
Assignees:-
Labels:

area-System.Collections,new-api-needs-documentation,community-contribution

Milestone:-

@hrrrrustic
Copy link
ContributorAuthor

hrrrrustic commentedMay 7, 2023
edited
Loading

Hashset &Dictionary ctor tests are failing due to increasing capacity to the nearest prime number. Is it fine to hardcode prime numbers in testdata?

AssertExtensions.Throws<ArgumentOutOfRangeException>(() => hashSet.TrimExcess(newCapacity));
}

public void HashSet_TrimAccessCurrentCapacity_DoesNothing()

Choose a reason for hiding this comment

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

Could you add a test checking that capacity expands after a buffer resize?

Copy link
Member

@eiriktsarpaliseiriktsarpalis left a comment

Choose a reason for hiding this comment

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

The TrimExcess implementation appears wrong to me for the case wherenewCapacity == Count.

@ghostghost added the needs-author-actionAn issue or pull request that requires more info or actions from the author. labelJun 22, 2023
@ghostghost added the no-recent-activity labelJul 6, 2023
@ghost
Copy link

This pull request has been automatically markedno-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will removeno-recent-activity.

@hrrrrustic
Copy link
ContributorAuthor

hrrrrustic commentedJul 15, 2023
edited
Loading

Just a comment to remove inactivity label, don't want to open new PR later 😄
I'll fix comments 2-3 weeks later, busy at work for now :(

Btw what's the deadline for shipping in .net8?

eiriktsarpalis reacted with thumbs up emoji

@ghostghost removed needs-author-actionAn issue or pull request that requires more info or actions from the author. no-recent-activity labelsJul 15, 2023
@danmoseley
Copy link
Member

@jeffhandley can share the cutoff for work like this.
Btw please set PR to Draft if it will be inactive, or just close and reopen later.

hrrrrustic reacted with thumbs up emoji

@hrrrrustichrrrrustic marked this pull request as draftJuly 16, 2023 14:20
@eiriktsarpalis
Copy link
Member

Btw what's the deadline for shipping in .net8?

A bit less than a month left, but do keep in mind that subsequent reviewing rounds can introduce additional delay. If it doesn't make it for .NET 8 that's OK too, we will be accepting .NET 9 contributions as soon as development for .NET 8 concludes.

hrrrrustic and jeffhandley reacted with thumbs up emoji

@hrrrrustichrrrrustic marked this pull request as ready for reviewAugust 5, 2023 22:36
@eiriktsarpalis
Copy link
Member

eiriktsarpalis commentedAug 7, 2023
edited
Loading

We're currently in the process of finalizing .NET 8 work, so we're not accepting any new features. I'll update the milestone and we can revisit this PR in a few weeks when .NET 9 feature work commences.

@ghost
Copy link

This pull request will now be closed since it had been markedno-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@ghostghost closed thisNov 22, 2023
@ghostghost removed the no-recent-activity labelNov 22, 2023
@eiriktsarpaliseiriktsarpalis self-assigned thisNov 22, 2023
@eiriktsarpaliseiriktsarpalis marked this pull request as ready for reviewNovember 22, 2023 10:59
@ghostghost removed the needs-author-actionAn issue or pull request that requires more info or actions from the author. labelNov 22, 2023
@eiriktsarpalis
Copy link
Member

I've rebased the changes and addressed remaining feedback. Should be good to merge now.

@eiriktsarpaliseiriktsarpalis merged commitebf881e intodotnet:mainNov 22, 2023
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsDec 23, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@danmoseleydanmoseleydanmoseley left review comments

@eiriktsarpaliseiriktsarpaliseiriktsarpalis approved these changes

Assignees

@eiriktsarpaliseiriktsarpalis

Labels
area-System.Collectionscommunity-contributionIndicates that the PR has been added by a community membernew-api-needs-documentation
Projects
None yet
Milestone
9.0.0
Development

Successfully merging this pull request may close these issues.

[API Proposal]: Add readonly Capacity property to HashSet<T> and Dictionary<K,V> and TrimExcess to HashSet<T>
3 participants
@hrrrrustic@danmoseley@eiriktsarpalis

[8]ページ先頭

©2009-2025 Movatter.jp