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

fix: Removes broken OrderedHashSet and adds a simple OrderedSet #1756

Merged
merged 7 commits into from
May 4, 2024

Conversation

kamronbatman
Copy link
Contributor

@kamronbatman kamronbatman commented May 4, 2024

Caution

BREAKING CHANGE
Removed OrderdHashSet and PooledOrderedHashSet due to bugs.

Note

Developer Note
The OrderedSet is not a full data structure. It is not particularly efficient. Pull Requests are welcome for a better implementation, especially if it ends up supporting ISet<T> and IReadOnlySet<T>

Summary

The ordered hash set was buggy. It's kind of painful to implement, so for now, I added a simple OrderedSet to suffice for gumps. Please reach out if this causes disruption!

@kamronbatman kamronbatman changed the title fix: Removes broken OrderedHashSet and adds a simple GrowOnlySet fix: Removes broken OrderedHashSet and adds a simple OrderedSet May 4, 2024
Comment on lines +29 to +30
private readonly Dictionary<T, int> _dictionary;
private readonly List<T> _list;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am so ashamed. I also don't care in this case since this is for legacy code.

@kamronbatman kamronbatman merged commit 4ea1d79 into main May 4, 2024
12 of 13 checks passed
@kamronbatman kamronbatman deleted the kbatman/replace_orderd_hash branch May 4, 2024 01:03
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.

None yet

1 participant