[All] Fix missing HashSet implementations and tests#4526
[All] Fix missing HashSet implementations and tests#4526ncave merged 5 commits intofable-compiler:mainfrom
HashSet implementations and tests#4526Conversation
There was a problem hiding this comment.
Pull request overview
This PR fills in missing HashSet surface-area across multiple Fable targets (TypeScript/JS, Python, Dart, Beam, Rust) and expands the corresponding test suites to cover the newly supported operations and constructor overloads.
Changes:
- Add/enable
HashSetoperations across targets (e.g.,CopyTo,Overlaps,SetEquals,SymmetricExceptWith, subset/superset relations, capacity ctor handling). - Update runtime/library helpers to implement the new
HashSetbehaviors (TSSet.fs, Pythonmap_util.py, DartTypes.dart, Beamfable_hashset.erl). - Expand target-specific test suites to validate the added
HashSetfunctionality, including custom comparer scenarios where supported.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Rust/tests/src/HashSetTests.fs | Refactors custom comparer helper and adds subset/superset tests. |
| tests/Python/TestHashSet.fs | Enables custom-comparer IntersectWith and adds coverage for more HashSet operations incl. CopyTo and subset/superset. |
| tests/Js/Main/HashSetTests.fs | Adds JS-side tests for newly supported HashSet operations and capacity ctor. |
| tests/Dart/src/HashSetTests.fs | Enables/extends Dart-side HashSet tests to cover missing operations and comparer scenarios. |
| tests/Beam/HashSetTests.fs | Adds Beam-side tests for additional HashSet ops (and documents comparer limitations). |
| src/Fable.Transforms/Replacements.fs | JS/TS replacement layer: supports capacity ctor and adds missing method replacements (CopyTo, Overlaps, SetEquals, SymmetricExceptWith). |
| src/Fable.Transforms/Python/Replacements.fs | Python replacement layer: supports capacity ctor and maps missing HashSet methods to map_util helpers. |
| src/Fable.Transforms/Dart/Replacements.fs | Dart replacement layer: supports capacity ctor and routes more HashSet methods to Types.dart helpers. |
| src/Fable.Transforms/Beam/Replacements.fs | Beam replacement layer: adds missing HashSet method replacements and richer CopyTo overload support. |
| src/Fable.Compiler/CHANGELOG.md | Changelog entry for the cross-target HashSet fixes. |
| src/Fable.Cli/CHANGELOG.md | Changelog entry for the cross-target HashSet fixes. |
| src/fable-library-ts/Set.fs | Fixes isProperSupersetOf and adds symmetricExceptWith, overlaps, setEquals, copyToArray helpers. |
| src/fable-library-py/fable_library/Set.fs | Fixes isProperSupersetOf for Python mutable sets. |
| src/fable-library-py/fable_library/map_util.py | Enhances set helpers to preserve custom comparers and adds missing HashSet-style operations. |
| src/fable-library-dart/Types.dart | Implements Dart-side HashSet operations and CopyTo support for custom-comparer sets. |
| src/fable-library-beam/fable_hashset.erl | Adds Beam-side HashSet operations (symmetric_except_with, overlaps, set_equals) and expands copy_to overloads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HashSetimplementations and tests