It would take too much effort to try to mitigate stdlib differences.
Fix low-hanging warnings, but turn off `.strictMemorySafety` on older toolchains by splitting the package manifest.
Package traits already pass defines with their trait name when building. Instead of adding our own conditional defines based on the traits we can use the trait provided defines directly. I observed that various tooling behaves better with the trait provided defines.
This re-enables the SortedCollections for easi(er) experimentation.
The module remains source unstable — it may go away entirely or it may receive arbitrary source-breaking changes in any new swift-collections release, with no special pre-announcement.
Key Changes:
- Implement Equatable, Hashable for SubSequences
- Implement SortedDictionary initializers
- init(keysWithValues:) and init(sortedKeysAndValues:) with named and unnamed variants.
- Expand benchmark suite for SortedDictionary
- Commit _BTree.Builder
Minor Changes:
- Update documentation
- Expand test suits
- Fix bug where SubSequences did not define subscript(bounds: Range<Index>)
- _Node
- Implement `depth` property for `_Node`
- Packs both `depth`, `count`, and `capacity` within a single UInt64.
- Implement `init(leftChild:seperator:rightChild:capacity:)` for `_Node`
- Implement `concatenateWith(node:seperatedBy:)` to `_Node.UnsafeHandle`
- Remove bad invariant check on `_Node.UnsafeHandle` deletion subroutines
- _BTree
- Add invariant checks as `_BTree.checkInvariants()`
- Separate `_BTree.*capacity` into `*size` and `*capacity`
- Make _FixedSizeArray top-level
- Remove deque behavior.
Documentation:
- Update complexity documentation style from 'n' to `self.count`
Testing:
- Expand tests for SortedDictionary
- Add tests for SortedDictionary.Keys
- Add tests for _Node.join(...) routines
- Add tests for _BTree.Builder
- Restore checkBidirectionalCollection tests for _BTree