Karoy Lorentey
cd0ca78dbd
[DequeModule] Assorted UniqueDeque doc string fixes
2026-04-27 18:10:26 -07:00
Karoy Lorentey
4225f78a2b
[DequeModule]: UniqueDeque.insert(addingCount:at:initializingWith:): Add empty shortcut
2026-04-27 18:01:24 -07:00
Karoy Lorentey
c068f8ccb7
[DequeModule] UniqueDeque replacements with Collections: Verify that the source’s count matches its contents
2026-04-27 18:01:24 -07:00
Karoy Lorentey
2c86775a6b
[DequeModule] UniqueDeque.replace(removing:addingCount:initializingWith:): Fix sizing issue
2026-04-27 18:01:24 -07:00
Karoy Lorentey
30f28dcdcb
[DequeModule] RigidDeque.consume(_:consumingWith:): Style nit: consume span explicitly
2026-04-27 18:01:24 -07:00
Karoy Lorentey
f5661c674a
[DequeModule] insert(addingCount:initializingWith:): Add shortcut for zero elements
2026-04-27 18:01:23 -07:00
Karoy Lorentey
285016b285
[DequeModule] RigidDeque replacements with Collections: Verify that the source’s count matches its contents
2026-04-27 18:01:23 -07:00
Karoy Lorentey
1d5418fb68
[DequeModule] RigidDeque.prepend(addingCount:initializingWith:): Add shortcut for zero elements
...
This was already present in the append variant; there is no reason not to do the same here.
2026-04-27 18:01:23 -07:00
Karoy Lorentey
5342399a18
[DequeModule] Fix small issues in doc strings
2026-04-27 18:01:23 -07:00
Karoy Lorentey
0be6f43972
[DequeModule] RigidDeque.nextMutableSpan(after:maximumCount:): Fix missing argument validation
2026-04-27 17:25:50 -07:00
Karoy Lorentey
654d57533f
[DequeModule] RigidDeque.consume(_:consumingWith:): Close resulting gap before returning
2026-04-27 17:18:05 -07:00
Karoy Lorentey
4b8dc6d951
BasicContainers] RigidDictionary.udateValue(forKey:with:): Fix undefined behavior on removals
2026-04-27 16:42:51 -07:00
Karoy Lorentey
c8080d050d
Merge pull request #630 from lorentey/fix-uniquearray-copying-replace-overallocation
...
[BasicContainers] UniqueArray.replace(removing:copying): Fix overallocation issue
2026-04-22 16:40:02 -07:00
Karoy Lorentey
5bd8ab095d
[BasicContainers] UniqueArray.replace(removing:copying): Fix overallocation issue
...
`UniqueArray.replace(removing:copying:)` overloads overestimated the amount of memory they need, sometimes leading to unnecessary reallocations. Fix this.
2026-04-22 16:23:15 -07:00
Karoy Lorentey
6ed215dcc2
Merge pull request #629 from lorentey/fix-fancy-rigidarray-replacement
...
[BasicContainers] RigidArray.replace(removing:consumingWith:addingCount:initializingWith:): Fix correctness issue with partial initialization
2026-04-22 16:10:13 -07:00
Karoy Lorentey
b0a7a4df1d
Merge pull request #628 from lorentey/fix-rigidset-insert
...
[BasicContainers] RigidSet.insert(maximumCount:from:): Fix spurious capacity overflow caused by incorrect accounting
2026-04-22 15:48:02 -07:00
Karoy Lorentey
d8ace00d14
[BasicContainers] RigidArray.replace(removing:consumingWith:addingCount:initializingWith:): Fix correctness issue with partial initialization
...
The original code was invoking `_closeGap` with an incorrect size (from `append` rather than `replace`), leading to runtime traps and potential memory safety issues if the `resize` invocation ends up underfilling the container.
2026-04-22 15:32:55 -07:00
Karoy Lorentey
b75bd4ef01
[BasicContainers] RigidSet.insert(maximumCount:from:): Fix spurious capacity overflow caused by incorrect accounting
2026-04-22 15:12:55 -07:00
Karoy Lorentey
f25e1b38fe
Merge pull request #627 from lorentey/add-bitset-iterator-shortcut
...
[BitSet] Add `BitSet.makeIterator(from:)`
2026-04-22 15:11:15 -07:00
Karoy Lorentey
084be39d7e
[BitSet] Add makeIterator(from:)
...
This enables faster iteration over subranges of a BitSet than the `Slice` type’s default indexing iterator. (Depending on the fill factor, the speedup can be as high as 4x — not insignificant.)
2026-04-21 16:28:14 -07:00
Karoy Lorentey
32e7c0e1ec
[Benchmark] Add BitSet iteration vs index(after:) benchmarks
2026-04-21 16:28:11 -07:00
Karoy Lorentey
bfa0a8b306
Merge pull request #626 from lorentey/adjust-experimental-workflows
...
Adjust experimental workflows
2026-04-21 16:09:51 -07:00
Karoy Lorentey
b03e9b68fd
[github] Don’t run containers/hashed containers tests on Swift 6.3
2026-04-21 14:49:53 -07:00
Karoy Lorentey
868c664c21
[test, ContainersPreview] Stop spuriously failing tests on older compilers
2026-04-21 14:49:20 -07:00
Karoy Lorentey
a8f8adedcb
Merge pull request #623 from lorentey/equatable-indices
...
[ContainersPreview] Don’t require `Container.Index` to conform to `Comparable`
2026-04-20 10:37:17 -07:00
Karoy Lorentey
1c95e19aeb
[ContainersPreview] Don’t require Container.Index to conform to Comparable
...
This slows down the default implementations of `distance(from:to:)` and `index(_:offsetBy:limitedBy:)`, but it allows linked lists to conform to `Container`. The trade off seems fair.
While we’re here, flesh out the `BidirectionalContainer` refinements a little, and add `Container.isEmpty` and `._custom[Last]IndexOfEquatableElement(_:)`.
This code is still untested.
2026-04-16 18:04:37 -07:00
Karoy Lorentey
9f0cf4be8b
Merge pull request #622 from thisismanan/ordered-set-neg-fix
...
OrderedSet: Don't crash on negative capacity values
2026-04-16 14:47:49 -07:00
Manan
396577ca27
OrderedSet: Don't crash on negative capacity values
...
Fixes https://github.com/apple/swift-collections/issues/608 , and starts behaving similar to Set()
2026-04-16 10:10:02 +05:30
Karoy Lorentey
181a432f74
Merge pull request #620 from apple/dependabot/github_actions/swiftlang/github-workflows/dot-github/workflows/soundness.yml-0.0.10
...
Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.9 to 0.0.10
2026-04-15 15:44:46 -07:00
dependabot[bot]
5b04586a1c
Bump swiftlang/github-workflows/.github/workflows/soundness.yml
...
Bumps [swiftlang/github-workflows/.github/workflows/soundness.yml](https://github.com/swiftlang/github-workflows ) from 0.0.9 to 0.0.10.
- [Release notes](https://github.com/swiftlang/github-workflows/releases )
- [Commits](https://github.com/swiftlang/github-workflows/compare/0.0.9...0.0.10 )
---
updated-dependencies:
- dependency-name: swiftlang/github-workflows/.github/workflows/soundness.yml
dependency-version: 0.0.10
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-04-13 06:15:47 +00:00
Karoy Lorentey
23da1a4c41
Merge pull request #619 from lorentey/track-array-proposal
...
Track array proposal
2026-04-09 10:30:05 -07:00
Karoy Lorentey
bf8441dc95
[BasicContainers] Fix typos in doc comments
2026-04-08 18:31:11 -07:00
Karoy Lorentey
a9b64d4f09
[BasicContainers] RigidArray,UniqueArray: Add Equatable conformance on Swift 6.4
...
This is currently conditional on the UnstableContainersPreview trait. (Swift 6.4 has not shipped yet, so we cannot unconditionally enable this without risking breakage.)
2026-04-08 18:31:11 -07:00
Karoy Lorentey
917eead3cb
[BasicContainers] RigidArray,UniqueArray: Add FIXME for Custom[Debug]StringConvertible conformances
2026-04-08 18:31:11 -07:00
Karoy Lorentey
7f4cebd2c5
BasicContainers] Add UniqueArray.isTriviallyIdentical(to:)
2026-04-08 18:31:10 -07:00
Karoy Lorentey
b4bfd6d02e
[BasicContainers] RigidArray.isTriviallyIdentical(to:): Don’t require Equatable elements, but do allow noncopyable ones
2026-04-08 18:31:07 -07:00
Karoy Lorentey
324c48ac6b
Merge pull request #617 from lorentey/rigidly-enforced-lifetime-requirements
...
Fix lifetime requirements rigidly enforced in the latest nightlies
2026-04-03 17:38:32 -07:00
Karoy Lorentey
2417a006e2
Also adjust tests
2026-04-03 17:23:11 -07:00
Karoy Lorentey
35b7d8fba4
Fix lifetime requirements rigidly enforced in the latest nightlies
2026-04-03 17:01:36 -07:00
Karoy Lorentey
495d96d27d
[ContainersPreview] Better illuminate the nextSpan problem on ContainerIterator
2026-04-03 09:01:48 -07:00
Mishal Shah
080a57943e
Merge pull request #614 from apple/dependabot/github_actions/swiftlang/github-workflows/dot-github/workflows/soundness.yml-0.0.9
...
Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.8 to 0.0.9
2026-04-02 16:43:33 -07:00
Karoy Lorentey
265fef259b
Merge pull request #615 from apple/dependabot/github_actions/swiftlang/github-workflows/dot-github/workflows/swift_package_test.yml-0.0.9
...
Bump swiftlang/github-workflows/.github/workflows/swift_package_test.yml from 0.0.8 to 0.0.9
2026-04-02 15:33:35 -07:00
dependabot[bot]
fb63a6735c
Bump swiftlang/github-workflows/.github/workflows/swift_package_test.yml
...
Bumps [swiftlang/github-workflows/.github/workflows/swift_package_test.yml](https://github.com/swiftlang/github-workflows ) from 0.0.8 to 0.0.9.
- [Release notes](https://github.com/swiftlang/github-workflows/releases )
- [Commits](https://github.com/swiftlang/github-workflows/compare/0.0.8...0.0.9 )
---
updated-dependencies:
- dependency-name: swiftlang/github-workflows/.github/workflows/swift_package_test.yml
dependency-version: 0.0.9
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-04-02 21:56:08 +00:00
dependabot[bot]
2e756e628f
Bump swiftlang/github-workflows/.github/workflows/soundness.yml
...
Bumps [swiftlang/github-workflows/.github/workflows/soundness.yml](https://github.com/swiftlang/github-workflows ) from 0.0.8 to 0.0.9.
- [Release notes](https://github.com/swiftlang/github-workflows/releases )
- [Commits](https://github.com/swiftlang/github-workflows/compare/0.0.8...0.0.9 )
---
updated-dependencies:
- dependency-name: swiftlang/github-workflows/.github/workflows/soundness.yml
dependency-version: 0.0.9
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-04-02 21:56:06 +00:00
Karoy Lorentey
63bfbed01a
Merge pull request #609 from natecook1000/borrowing-sequence-alignment
...
Align `BorrowingSequence` implementation with proposal
2026-03-27 15:25:42 -07:00
Karoy Lorentey
e0ec6b0976
UniqueSet: Fix copypasta
2026-03-27 11:59:41 -07:00
Karoy Lorentey
b9a926a2b1
Re-add line mistakenly deleted in RigidDequeTest
2026-03-27 11:56:08 -07:00
Karoy Lorentey
75b0309e12
Producer.skip(upTo:) → .skip(by:)
...
This is to align naming with BorrowingIteratorProtocol. The signatures are still different, as Producers may throw.
2026-03-27 11:52:05 -07:00
Karoy Lorentey
685ef74751
Fix {Rigid,Unique}{Set,Dictionary}
2026-03-27 11:47:03 -07:00
Karoy Lorentey
f83e9b6538
Rename Collection.underestimatedCount_
2026-03-27 11:47:00 -07:00