Skip to content

Conversation

@Exelord
Copy link
Contributor

@Exelord Exelord commented Sep 8, 2024

Hi @thetarnav and @atk :)

Decided to split this draft PR into 2 chunks Set and Map fixes. Starting with Set here. Best to review commit by commit. Let me know where more reasoning is required, I will add comments.

Thanks!

@changeset-bot
Copy link

changeset-bot bot commented Sep 8, 2024

🦋 Changeset detected

Latest commit: 32fcb81

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@solid-primitives/set Minor
@solid-primitives/trigger Minor
@solid-primitives/map Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

values(): IterableIterator<T> {
return this.keys();

*values(): IterableIterator<T> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Iterators no longer track specific keys. That optimization was working under the assumption that a BREAK will always happen in specific iteration, which might not be always a case as it can depend on external logic. All iterators should always be rerun if any op to the Set will happen.

Copy link
Member

Choose a reason for hiding this comment

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

Can you mention that in the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, Could you point me a place where I should do that?

Copy link
Member

Choose a reason for hiding this comment

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

Just another section „break optimization” after the „how to use” should work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I understand what is expected here to document to be honest. There is no break optimization anymore, and the previous was a bug. Should't that be mentioned rather in changelog?

Copy link
Member

@thetarnav thetarnav left a comment

Choose a reason for hiding this comment

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

Good changes.

values(): IterableIterator<T> {
return this.keys();

*values(): IterableIterator<T> {
Copy link
Member

Choose a reason for hiding this comment

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

Can you mention that in the docs?

@thetarnav thetarnav merged commit 31f8723 into solidjs-community:main Sep 29, 2024
@github-actions github-actions bot mentioned this pull request Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants