Commit Graph
157 Commits
Author SHA1 Message Date
Dianna 5f2185a118 use #if directives to conditionally @preconcurrency import the Dispatch module to enable building the package on linux 2024-09-29 21:44:34 +00:00
Gwendal Roué 46e15616a7 [BREAKING] macOS 10.15+ 2024-09-21 14:28:24 +02:00
Gwendal Roué e4a4735494 [BREAKING] tvOS 13+ 2024-09-21 13:57:35 +02:00
Gwendal Roué 8c40592955 [BREAKING] iOS 13+ 2024-09-21 13:57:23 +02:00
Gwendal Roué e307e9c1da Improve CaseInsensitiveIdentifier documentation 2024-09-15 12:19:19 +02:00
Gwendal Roué d3e62dc5c9 Fix compiler warnings about default Inflections 2024-09-14 17:24:47 +02:00
Gwendal Roué 5f384a4b22 ValueObservation is Sendable 2024-09-08 16:17:51 +02:00
Gwendal Roué e35fb79308 DatabaseRegionObservation callbacks are Sendable 2024-09-08 16:12:33 +02:00
Gwendal Roué 6371dc05d5 OnDemandFuture closure is Sendable
It can be called at any time, when the publisher is subscribed.
2024-09-08 16:09:19 +02:00
Gwendal Roué 55560ccd90 [SENDING REGRET] Pool async methods require Sendable closures
We should be able to use sending closures instead, but DispatchQueue.async does not accept sending closures yet.
2024-09-08 16:09:19 +02:00
Gwendal Roué ea4d208037 Rename ReadWriteBox to ReadWriteLock 2024-09-08 13:33:07 +02:00
Gwendal Roué 6a29d6c081 [BREAKING] Prefer Collection over Sequence for filter(keys:) and derived APIs
We were frequently turning those sequences into an Array in order to check their emptiness, and generally were not sure we'd iterate a sequence only once.

Also use `some Sequence` and `some Collection` whenever possible.
2024-09-08 12:52:27 +02:00
Gwendal Roué e9d0d381f6 Fix concurrency warning with DispatchQueue.mainKey 2024-08-31 10:48:51 +02:00
Gwendal Roué 30569aba27 OrderedDictionary is conditionally Sendable 2024-08-25 18:06:29 +02:00
Gwendal Roué b0c5725075 OnDemandFuture fulfill is Sendable 2024-08-25 17:34:54 +02:00
Gwendal Roué b587afba0e Pool is Sendable 2024-08-25 17:28:02 +02:00
Gwendal Roué e93e4c5a31 ReadWriteBox is Sendable 2024-08-25 17:21:19 +02:00
Gwendal Roué e72a37d7d5 Rename LockedBox to Mutex 2024-08-25 12:40:28 +02:00
Gwendal Roué 79cb862478 [BREAKING] watchOS 7+
Rationale: https://github.com/groue/GRDB.swift/issues/1472#issuecomment-1960696836
2024-08-24 15:45:38 +02:00
Gwendal Roué 43ced9b2f0 Trivial Sendable conformances
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
László Kustra 25b49cba01 Add autoreleasepool shim for Linux 2023-06-29 16:23:36 +02:00
Gwendal Roué 4a5d4d6e49 Fix Xcode 15 warnings 2023-06-06 08:06:06 +02:00
Gwendal Roué 0c333b6e22 Performance improvements 2023-03-11 12:10:25 +01:00
Gwendal Roué aff924a72b Upgrade Swiftlint and fix warnings 2023-02-04 11:23:14 +01:00
Gwendal Roué ac214e6760 SE-0345: if let shorthand for shadowing an existing optional variable 2023-01-30 08:00:47 +01:00
Gwendal Roué d3c289a320 Availability checks cleanup 2023-01-22 12:37:40 +01:00
baegteun a9feac1339 ♻️ :: OSX -> macOS in Availability Check 2023-01-17 13:58:37 +09:00
Gwendal Roué 590158ca3e Update license for 2023 2023-01-15 15:24:30 +01:00
Gwendal Roué 38ce06d263 OrderedDictionary.description 2023-01-14 12:33:41 +01:00
Gwendal Roué 9b663e3bcc Pool can discard elements after use 2022-11-18 08:52:52 +01:00
Gwendal Roué b8bc8273a9 Turn snapshot tokens into a proper reader: DatabaseSnapshotPool 2022-11-14 18:22:13 +01:00
Gwendal Roué 13c804d1cc DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué 1818534513 DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué 82b4d90a82 Xcode 14 RC doesn't ship with the Swift 5.6 stdlib
https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171
2022-09-09 08:16:55 +02:00
Gwendal Roué 546bba17fb Make LockedBox.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué a9fcf1b9c1 SE-0335, SE-0341, SE-0346, SE-0352, SE-0358: some, any, primary associated types 2022-08-21 21:22:34 +02:00
Gwendal Roué dd55175978 SE-0345: if let x { }
https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 58293befc9 BREAKING: Optional is a database value like others 2022-08-21 21:22:34 +02:00
Gwendal Roué df0ae43c5f Swift 5.7 required: Sendable 2022-08-21 19:21:26 +02:00
Gwendal Roué 952ee0a137 Rename Pool.async to asyncGet 2022-05-25 17:25:43 +02:00
Gwendal Roué ee92db9d6f Pool has a QoS 2022-05-25 17:21:50 +02:00
Gwendal Roué 9ed309b470 Fix failing tests for number of threads created by DatabasePool 2022-05-24 19:31:22 +02:00
Gwendal Roué 209192d3a5 Require Swift 5.6 Compiler for Concurrency Support 2022-04-13 23:07:33 +02:00
Gwendal Roué 6ab3fea8fb Refactor ValueObservation 2022-03-17 18:44:30 +01:00
Gwendal Roué 09922c34ff Code formatting 2022-01-23 12:24:34 +01:00
Gwendal Roué 0cf4c4efba Merge branch 'development' into dev/async 2021-12-12 17:00:08 +01:00
Gwendal Roué 95b3f447e4 Revert "Make sure Inflections.default is lazily loaded, even in optimized release builds"
This reverts commit c62ccf1de7 (aimed at fixing #755).

We can do this because https://github.com/apple/swift/pull/30445 is present in the Swift 5.3 release https://github.com/apple/swift/releases/tag/swift-5.3-RELEASE
2021-12-12 13:57:34 +01:00
Gwendal Roué 1b62e06c4a Expose Sendable conformance to Swift 5.5
But async apis are still only exposed to Swift 5.5.2.

Sendable conformances are helpful for users of Xcode < 13.2.
2021-12-10 08:08:47 +01:00
Gwendal Roué 61b0df8017 Enable async APIs on Xcode 13.2+ only
Xcode 13.1 won't have access to async apis. This simplifies our availability checks.

The techniques were inspired from:

- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#api-design
- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#backwards-compatibility-of-declarations-and-checked-swift-concurrency
2021-12-08 11:17:40 +01:00
Gwendal Roué e6e2536f6b Reverse DatabaseColumnDecodingStrategy
It does not convert coding keys to columns, but columns to CodingKeys, exactly as JSONDecoder.KeyDecodingStrategy
2021-08-29 13:52:36 +02:00