Commit Graph
132 Commits
Author SHA1 Message Date
Karoy Lorentey f8ac3af99b Merge pull request #156 from apple/fiddle-with-schemes
Reinstate custom schemes under Utils/swift-collections.xcworkspace
2022-08-05 13:47:47 -07:00
Karoy Lorentey 00a99aa77c swift-collections.xcworkspace: Update dependencies 2022-08-03 12:18:57 -07:00
Karoy Lorentey 3fce10a45a Set up shared schemes in the xcworkspace under Utils/ 2022-08-03 12:18:57 -07:00
Karoy Lorentey afac2cf830 Merge pull request #155 from hectormatos2011/patch-1
Remove Swift PM Artifacts to avoid Generated Schemes in Xcode
2022-08-03 12:04:06 -07:00
Hector Matos 7016a13f0e Update .gitignore 2022-08-02 16:46:27 -05:00
Hector Matos 480b0af010 Delete .swiftpm directory 2022-08-02 16:44:59 -05:00
Karoy Lorentey 108ac4fa4e Merge pull request #141 from apple/merge.2021-02-09.release-1.0→main
Merge `release/1.0` to `main`
2022-02-09 14:46:41 -08:00
Karoy Lorentey 29120ea640 Merge branch 'release/1.0' 2022-02-09 11:56:38 -08:00
Karoy Lorentey 20e7fceec8 Merge pull request #140 from apple/fix-OrderedDictionary-grouping-inference
[OrderedDictionary] Fix type inference issue with `OrderedDictionary.init(grouping:by:)`
2022-02-09 11:55:48 -08:00
Karoy Lorentey 50e6a1ac71 [OrderedDictionary] Fix type inference issue with OrderedDictionary.init(grouping:by:)
This adds a new overload to help the type checker infer `[S.Element]` as the default `Value` type.

Resolves #139.
2022-02-08 14:16:18 -08:00
Karoy Lorentey 22dc81b89f Merge pull request #130 from lorentey/main
Merge release/1.0 to main
2021-11-15 17:22:35 -08:00
Karoy Lorentey 286fedb1e8 Merge branch 'release/1.0' 2021-11-15 17:01:49 -08:00
Karoy Lorentey 48254824bb Merge pull request #113 from lorentey/deque-scaling
[Deque] `append(contentsOf:):` Use exponential capacity reservation
1.0.2
2021-11-15 16:15:59 -08:00
Károly Lőrentey efefae5653 [Deque] append(contentsOf:): Use exponential capacity reservation
Depending on the supplied sequence, `Deque.append(contentsOf:)` currently reserves just enough capacity as it needs to perform the append. This isn't right -- it can result in O(n) reallocs instead of O(log(n)) when items are incrementally appended in constant-sized `append(contents:)` batches.
2021-11-15 16:12:28 -08:00
Karoy Lorentey 1337897dc6 Merge pull request #128 from lorentey/full-test-improvements
[Utils] run-full-tests.sh: Add support for testing on Swift 5.3 without manual editing
2021-11-15 16:05:40 -08:00
Karoy Lorentey 9dde4b5603 [Utils] run-full-tests.sh: Add support for testing on Swift 5.3 without manual editing 2021-11-15 15:46:12 -08:00
Karoy Lorentey da3a73ed90 Merge pull request #126 from lorentey/full-test-improvements
[Utils] run-full-tests.sh: Keep going after a failure
2021-11-15 14:50:57 -08:00
Károly Lőrentey ddc8b9c66d [Utils] run-full-tests.sh: Keep going after a failure 2021-11-15 14:08:09 -08:00
Karoy Lorentey c86bf6adf0 Merge pull request #123 from lorentey/fix-OrderedSet
[OrderedSet] Add missing uniqueness check
2021-11-12 17:09:27 -08:00
Károly Lőrentey 074b0ad213 [OrderedSet] Add missing uniqueness check in OrderedSet._insertNew(_:at:in:) 2021-11-11 00:40:01 -08:00
Károly Lőrentey 13b5889757 [OrderedCollections][test] Strengthen withHiddenCopies tests
`withHiddenCopies(if:of:)` is supposed to check for value semantic violations where mutations of one copy affect another -- however, it currently only checks that iteration returns the same items before/after the change, not that the old copy is still in a fully consistent state.

Add an extra parameter that can be set to a closure that performs stricter checks.

Use it to call `_checkInvariants()` in ordered collections tests, uncovering a missing uniqueness check in `OrderedSet._insertNew(_:at:in:)`.
2021-11-11 00:39:29 -08:00
Karoy Lorentey 6eeae8088b Merge pull request #121 from jPaolantonio/jp/readme-link-fix
Fix link to package internal documentation
2021-10-27 18:00:41 -07:00
Karoy Lorentey 1904ebb97d Merge pull request #122 from compnerd/patch-1 2021-10-25 13:36:34 -07:00
Karoy Lorentey 776410b72d Merge pull request #115 from just-gull/heap-tests-release
[Heap] Enable heap tests in optimized builds (#101)
2021-10-22 17:04:38 -07:00
Saleem Abdulrasool 1c1e6206fa Update CMakeLists.txt
Remove `Heap+OrderedViews.swift` from the source list after #119.
2021-10-22 15:08:52 -07:00
James Paolantonio 276ddee5df Fix link to package internal documentation 2021-10-22 15:47:11 -04:00
Karoy Lorentey aba079126e Merge pull request #119 from lorentey/remove-heap-views
[Heap] Remove Heap's `ascending` and `descending` views
2021-10-20 11:56:00 -07:00
Sergey PetrenkoandKaroy Lorentey 8b3af12ece @_spi attributes are removed because they weren't necessary
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2021-10-12 13:08:38 +03:00
Karoy Lorentey fc876e18c1 Merge pull request #118 from compnerd/no-foundations
PriorityQueueModule: remove `import Foundation`
2021-10-11 15:03:48 -07:00
Karoy Lorentey f41f2cae69 [Heap] Update docs 2021-10-11 14:54:59 -07:00
Karoy Lorentey 30e6eb1116 [Heap] Remove Heap's ascending and descending views
These two do *very* non-trivial processing, so they don't at all work like views in the Standard Library.

They also don't carry their weight -- they are simply lightweight wrappers around `popMin` and `popMax`, respectively.

Let's get rid of them before we etch them in stone as public API.
2021-10-11 14:50:08 -07:00
Saleem Abdulrasool 95be379a3a PriorityQueueModule: remove import Foundation
This removes an accidental dependency on Foundation.
2021-10-11 13:04:22 -07:00
Sergey Petrenko cfb6dd1810 [Heap] Enable heap tests in optimized builds (#101)
@testable import is replaced with @_spi(Testing) import.
A test for _Node is moved to another file because this test needs access to internals of PriorityQueueModule and this test will not work in optimized builds.
2021-10-07 11:46:25 +03:00
Karoy Lorentey 2d33a0ea89 Merge pull request #111 from neonichu/fix-aarch64
[CMake] Match lowercase "aarch64"
1.0.1
2021-09-14 12:05:08 -07:00
Karoy Lorentey 20784100fd Merge pull request #112 from lorentey/OrderedSetAlgebra
[OrderedSet][doc] Fix thinko
2021-09-14 12:01:03 -07:00
Karoy Lorentey 7f57a0ed1c [OrderedSet][doc] Fix thinko 2021-09-14 11:50:31 -07:00
Boris Buegling 39a16a15cc [CMake] Match lowercase "aarch64"
Seems like it is also possible for "aarch64" to be spelled lowercase, this fixes building on Ubuntu on arm at least.
2021-09-13 16:30:41 -07:00
Karoy Lorentey 07e47b1e93 Merge pull request #110 from lorentey/burn-again-shell
[run-full-tests.sh] Fix bashism: == vs =
1.0.0
2021-09-10 14:10:14 -07:00
Karoy Lorentey 103008aca4 [run-full-tests.sh] Fix bashism: == vs = 2021-09-10 13:57:23 -07:00
Karoy Lorentey 52d426a116 Merge pull request #109 from apple/readme-update
[README] Note that `Heap` hasn't been tagged yet & list other enhancements in progress
2021-09-10 13:13:25 -07:00
Karoy Lorentey c46c77f7f8 Note that Heap hasn't been tagged yet & list other enhancements in progress 2021-09-10 12:59:43 -07:00
Karoy Lorentey 2ce28a9eaa Merge pull request #108 from lorentey/main
Merge `release/1.0` into `main`
2021-09-10 12:46:15 -07:00
Karoy Lorentey 5f255a887e Merge branch 'release/1.0' 2021-09-10 11:58:12 -07:00
Karoy Lorentey 37e15aed66 Merge pull request #107 from lorentey/let’s-table-that
[OrderedSet] Don't let the unchecked init create large sets with no hash table
2021-09-10 11:15:36 -07:00
Karoy Lorentey 1c54f35b45 Merge pull request #105 from lorentey/main
[NFC] Merge release/1.0 to main
2021-09-09 17:03:21 -07:00
Karoy Lorentey f69104b507 [OrderedSet] Don't set a default value for the primary initializer's second argument
This will hopefully prevent issues like the one fixed in the previous commit from reoccurring in the future.
2021-09-09 16:44:06 -07:00
Karoy Lorentey e4f62c1520 [OrderedSet] Don't let the unchecked init create large sets with no hash table
In debug builds, the `OrderedSet.init(uncheckedUniqueElements:)` initializer always created a set with no hash table, even if it had an element count >15. This is technically an invariant violation (caught by `_checkInvariants()`), although it generally only triggers (very) slow performance. (The set reverts to linear searching.)
2021-09-09 16:44:06 -07:00
Karoy Lorentey 95fa069858 Merge pull request #106 from lorentey/check-please
[1.0][OrderedSet] Make _checkInvariants public and call it in more operations
2021-09-09 11:46:12 -07:00
Karoy Lorentey 96100d4b6a [NFC] Cosmetic/doc updates 2021-09-08 21:12:52 -07:00
Karoy Lorentey e959a64528 [OrderedDictionary] Add some more _checkInvariants() calls 2021-09-08 21:12:52 -07:00