Commit Graph
149 Commits
Author SHA1 Message Date
Michael Steindorfer b34c8dad97 [Capsule] Implement Equatable protocol 2022-08-09 17:20:28 +02:00
Michael Steindorfer 8e2ec3c49b [Capsule] Make copyAndSetNode generic 2022-08-09 17:20:28 +02:00
Michael Steindorfer d4ecaa0f75 [Capsule] Make spine of trie monomorphic 2022-08-09 17:20:28 +02:00
Michael Steindorfer e09c8db428 [Capsule] Implement preliminary hash-collision resolution 2022-08-09 17:20:28 +02:00
Michael Steindorfer 77ef6122d3 [Capsule] Rename and simplify smoke tests 2022-08-09 17:20:28 +02:00
Michael Steindorfer b518d56b65 [Capsule] Implement Hashable extension for HashMap 2022-08-09 17:20:28 +02:00
Michael Steindorfer 29dd2c8b4f [Capsule] Remove unused XCTest import 2022-08-09 17:20:28 +02:00
Michael Steindorfer ce5a6bd71a [Capsule] Update copyright headers
Correctly reflects refining edits as well and not only initial draft date.
2022-08-09 17:20:28 +02:00
Michael Steindorfer b3e1e9d446 [Capsule] Harmonize identation 2022-08-09 17:20:28 +02:00
Michael Steindorfer 1598e22e45 [Capsule] Split nested structs and classes into separate files 2022-08-09 17:20:28 +02:00
Michael Steindorfer 88051725bb [Capsule] Rename Common.swift -> _Common.swift 2022-08-09 17:20:28 +02:00
Michael Steindorfer 3cb6fb3251 [Capsule] Split HashMap extensions into separate files 2022-08-09 17:20:28 +02:00
Michael Steindorfer 097e6b75b7 [Capsule] Update copyright headers 2022-08-09 17:20:28 +02:00
Michael Steindorfer 03913fd745 [Capsule] Increase visibility of count and subscript to public 2022-08-09 17:20:28 +02:00
Michael Steindorfer 13bd00bda4 [Capsule] Adhere to CollectionsTestSupport in test code 2022-08-09 17:20:28 +02:00
Michael Steindorfer 449e5706bd [Capsule] Add package configuration 2022-08-09 17:20:28 +02:00
Michael Steindorfer 488322edff [Capsule] Import sources 2022-08-09 17:20:28 +02:00
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