From 2d07f5ccafce87fc95610b820f876c698f74f14c Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 20 Sep 2024 17:17:28 -0700 Subject: [PATCH] Upgrade to core v14.13.0 (#8689) --- .github/workflows/build-pr.yml | 186 +++++++++++----------- .github/workflows/master-push.yml | 2 +- CHANGELOG.md | 12 +- Package.swift | 2 +- Realm/ObjectServerTests/RealmServer.swift | 8 +- RealmSwift/Impl/SchemaDiscovery.swift | 2 +- RealmSwift/ObjectId.swift | 1 + RealmSwift/Realm.swift | 2 +- RealmSwift/Tests/CodableTests.swift | 7 +- RealmSwift/Tests/TestUtils.swift | 2 - dependencies.list | 2 +- scripts/pr-ci-matrix.rb | 2 +- 12 files changed, 110 insertions(+), 118 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index cb0200111f..0d37793fd3 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -45,29 +45,29 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-osx - osx-16_Release_Candidate: + osx-16: runs-on: macos-14 - name: Test osx on Xcode 16_Release_Candidate + name: Test osx on Xcode 16 env: - DEVELOPER_DIR: '/Applications/Xcode_16_Release_Candidate.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-osx - osx-16_1_beta: + osx-16_1_beta_2: runs-on: macos-14 - name: Test osx on Xcode 16.1_beta + name: Test osx on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-osx - osx-encryption-16_1_beta: + osx-encryption-16_1_beta_2: runs-on: macos-14 - name: Test osx-encryption on Xcode 16.1_beta + name: Test osx-encryption on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-osx-encryption @@ -81,11 +81,11 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-swiftpm - swiftpm-16_1_beta: + swiftpm-16_1_beta_2: runs-on: macos-14 - name: Test swiftpm on Xcode 16.1_beta + name: Test swiftpm on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-swiftpm @@ -108,38 +108,38 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-swiftpm-debug - swiftpm-debug-16_Release_Candidate: + swiftpm-debug-16: runs-on: macos-14 - name: Test swiftpm-debug on Xcode 16_Release_Candidate + name: Test swiftpm-debug on Xcode 16 env: - DEVELOPER_DIR: '/Applications/Xcode_16_Release_Candidate.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-swiftpm-debug - swiftpm-debug-16_1_beta: + swiftpm-debug-16_1_beta_2: runs-on: macos-14 - name: Test swiftpm-debug on Xcode 16.1_beta + name: Test swiftpm-debug on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-swiftpm-debug - swiftpm-address-16_1_beta: + swiftpm-address-16_1_beta_2: runs-on: macos-14 - name: Test swiftpm-address on Xcode 16.1_beta + name: Test swiftpm-address on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-swiftpm-address - swiftpm-thread-16_1_beta: + swiftpm-thread-16_1_beta_2: runs-on: macos-14 - name: Test swiftpm-thread on Xcode 16.1_beta + name: Test swiftpm-thread on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-swiftpm-thread @@ -153,11 +153,11 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-ios-static - ios-static-16_1_beta: + ios-static-16_1_beta_2: runs-on: macos-14 - name: Test ios-static on Xcode 16.1_beta + name: Test ios-static on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-ios-static @@ -171,11 +171,11 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-ios - ios-16_1_beta: + ios-16_1_beta_2: runs-on: macos-14 - name: Test ios on Xcode 16.1_beta + name: Test ios on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-ios @@ -189,11 +189,11 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-watchos - watchos-16_1_beta: + watchos-16_1_beta_2: runs-on: macos-14 - name: Test watchos on Xcode 16.1_beta + name: Test watchos on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-watchos @@ -207,11 +207,11 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-tvos - tvos-16_1_beta: + tvos-16_1_beta_2: runs-on: macos-14 - name: Test tvos on Xcode 16.1_beta + name: Test tvos on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-tvos @@ -225,11 +225,11 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-visionos - visionos-16_1_beta: + visionos-16_1_beta_2: runs-on: macos-14 - name: Test visionos on Xcode 16.1_beta + name: Test visionos on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-visionos @@ -252,20 +252,20 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-osx-swift - osx-swift-16_Release_Candidate: + osx-swift-16: runs-on: macos-14 - name: Test osx-swift on Xcode 16_Release_Candidate + name: Test osx-swift on Xcode 16 env: - DEVELOPER_DIR: '/Applications/Xcode_16_Release_Candidate.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-osx-swift - osx-swift-16_1_beta: + osx-swift-16_1_beta_2: runs-on: macos-14 - name: Test osx-swift on Xcode 16.1_beta + name: Test osx-swift on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-osx-swift @@ -279,11 +279,11 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-ios-swift - ios-swift-16_1_beta: + ios-swift-16_1_beta_2: runs-on: macos-14 - name: Test ios-swift on Xcode 16.1_beta + name: Test ios-swift on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-ios-swift @@ -297,38 +297,38 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-tvos-swift - tvos-swift-16_1_beta: + tvos-swift-16_1_beta_2: runs-on: macos-14 - name: Test tvos-swift on Xcode 16.1_beta + name: Test tvos-swift on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-tvos-swift - osx-swift-evolution-16_1_beta: + osx-swift-evolution-16_1_beta_2: runs-on: macos-14 - name: Test osx-swift-evolution on Xcode 16.1_beta + name: Test osx-swift-evolution on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-osx-swift-evolution - ios-swift-evolution-16_1_beta: + ios-swift-evolution-16_1_beta_2: runs-on: macos-14 - name: Test ios-swift-evolution on Xcode 16.1_beta + name: Test ios-swift-evolution on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-ios-swift-evolution - tvos-swift-evolution-16_1_beta: + tvos-swift-evolution-16_1_beta_2: runs-on: macos-14 - name: Test tvos-swift-evolution on Xcode 16.1_beta + name: Test tvos-swift-evolution on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-tvos-swift-evolution @@ -342,11 +342,11 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-catalyst - catalyst-16_1_beta: + catalyst-16_1_beta_2: runs-on: macos-14 - name: Test catalyst on Xcode 16.1_beta + name: Test catalyst on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-catalyst @@ -360,20 +360,20 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-catalyst-swift - catalyst-swift-16_1_beta: + catalyst-swift-16_1_beta_2: runs-on: macos-14 - name: Test catalyst-swift on Xcode 16.1_beta + name: Test catalyst-swift on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-catalyst-swift - xcframework-16_1_beta: + xcframework-16_1_beta_2: runs-on: macos-14 - name: Test xcframework on Xcode 16.1_beta + name: Test xcframework on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-xcframework @@ -396,74 +396,74 @@ jobs: - uses: actions/checkout@v4 - run: sh -x build.sh verify-cocoapods-osx - cocoapods-osx-16_Release_Candidate: + cocoapods-osx-16: runs-on: macos-14 - name: Test cocoapods-osx on Xcode 16_Release_Candidate + name: Test cocoapods-osx on Xcode 16 env: - DEVELOPER_DIR: '/Applications/Xcode_16_Release_Candidate.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-cocoapods-osx - cocoapods-osx-16_1_beta: + cocoapods-osx-16_1_beta_2: runs-on: macos-14 - name: Test cocoapods-osx on Xcode 16.1_beta + name: Test cocoapods-osx on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-cocoapods-osx - cocoapods-ios-static-16_1_beta: + cocoapods-ios-static-16_1_beta_2: runs-on: macos-14 - name: Test cocoapods-ios-static on Xcode 16.1_beta + name: Test cocoapods-ios-static on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-cocoapods-ios-static - cocoapods-ios-16_1_beta: + cocoapods-ios-16_1_beta_2: runs-on: macos-14 - name: Test cocoapods-ios on Xcode 16.1_beta + name: Test cocoapods-ios on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-cocoapods-ios - cocoapods-watchos-16_1_beta: + cocoapods-watchos-16_1_beta_2: runs-on: macos-14 - name: Test cocoapods-watchos on Xcode 16.1_beta + name: Test cocoapods-watchos on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-cocoapods-watchos - cocoapods-tvos-16_1_beta: + cocoapods-tvos-16_1_beta_2: runs-on: macos-14 - name: Test cocoapods-tvos on Xcode 16.1_beta + name: Test cocoapods-tvos on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-cocoapods-tvos - cocoapods-catalyst-16_1_beta: + cocoapods-catalyst-16_1_beta_2: runs-on: macos-14 - name: Test cocoapods-catalyst on Xcode 16.1_beta + name: Test cocoapods-catalyst on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-cocoapods-catalyst - ios-swiftui-16_1_beta: + ios-swiftui-16_1_beta_2: runs-on: macos-14 - name: Test ios-swiftui on Xcode 16.1_beta + name: Test ios-swiftui on Xcode 16.1_beta_2 env: - DEVELOPER_DIR: '/Applications/Xcode_16.1_beta.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.1_beta_2.app/Contents/Developer' steps: - uses: actions/checkout@v4 - run: sh -x build.sh verify-ios-swiftui diff --git a/.github/workflows/master-push.yml b/.github/workflows/master-push.yml index 9532fccaaf..1f4a666c78 100644 --- a/.github/workflows/master-push.yml +++ b/.github/workflows/master-push.yml @@ -6,7 +6,7 @@ on: - "master" - "release/**" env: - XCODE_VERSION: "['15.3', '15.4', '16_Release_Candidate', '16.1_beta']" + XCODE_VERSION: "['15.3', '15.4', '16', '16.1_beta_2']" PLATFORM: "['ios', 'osx', 'watchos', 'tvos', 'catalyst', 'visionos']" DOC_VERSION: '15.4' RELEASE_VERSION: '15.4' diff --git a/CHANGELOG.md b/CHANGELOG.md index 8569ec6fd6..9c46ce7f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,14 +27,12 @@ The minimum supported version of Xcode is now 15.3. using Xcode 16 in Swift 5 mode due to the removal of implicit isolation when using property wrappers on member variables. This resulted in some new sendability warnings in Xcode 16 (or errors in Swift 6 mode). -* Add Xcode 16 and 16.1 binaries to the release packages (currently built with - beta 6 and beta 1 respectively). +* Add Xcode 16 and 16.1 binaries to the release packages. ### Fixed -* ([#????](https://github.com/realm/realm-swift/issues/????), since v?.?.?) -* None. - - +* Having a query with a number of predicates ORed together may result in a + crash on some platforms (strict weak ordering check failing on iphone) + ([#8028](https://github.com/realm/realm-core/issues/8028), since v10.50.0) ### Compatibility * Realm Studio: 15.0.0 or later. @@ -44,7 +42,7 @@ The minimum supported version of Xcode is now 15.3. * Xcode: 15.3.0-16.1 beta. ### Internal -* Upgraded realm-core from ? to ? +* Upgraded realm-core from v14.12.1 to 14.13.0 10.53.1 Release notes (2024-09-05) ============================================================= diff --git a/Package.swift b/Package.swift index 5321bbd27f..963009182d 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ import PackageDescription import Foundation -let coreVersion = Version("14.12.1") +let coreVersion = Version("14.13.0") let cocoaVersion = Version("10.53.1") #if compiler(>=6) diff --git a/Realm/ObjectServerTests/RealmServer.swift b/Realm/ObjectServerTests/RealmServer.swift index 8c8b400a2b..07a46ede78 100644 --- a/Realm/ObjectServerTests/RealmServer.swift +++ b/Realm/ObjectServerTests/RealmServer.swift @@ -38,7 +38,6 @@ extension URLSession { completionHandler(.success(data)) } else if let error = error { completionHandler(.failure(error)) - // swiftlint:disable:next non_optional_string_data_conversion } else if let data = data, let string = String(data: data, encoding: .utf8) { completionHandler(.failure(NSError(domain: URLError.errorDomain, code: URLError.badServerResponse.rawValue, @@ -657,7 +656,6 @@ final public class RealmServer: NSObject, Sendable { let pipe = Pipe() pipe.fileHandleForReading.readabilityHandler = { file in guard file.availableData.count > 0, - // swiftlint:disable:next non_optional_string_data_conversion let available = String(data: file.availableData, encoding: .utf8)?.split(separator: "\t") else { return } @@ -678,9 +676,9 @@ final public class RealmServer: NSObject, Sendable { } else if part.contains("ERROR") { parts.append("🔴") } else if let json = try? JSONSerialization.jsonObject(with: part.data(using: .utf8)!) { - parts.append(String(decoding: try! JSONSerialization.data(withJSONObject: json, - options: .prettyPrinted), - as: UTF8.self)) + try! parts.append(String(data: JSONSerialization.data(withJSONObject: json, + options: .prettyPrinted), + encoding: .utf8)!) } else if !part.isEmpty { parts.append(String(part)) } diff --git a/RealmSwift/Impl/SchemaDiscovery.swift b/RealmSwift/Impl/SchemaDiscovery.swift index 2508cbc6be..0a7c3a71ba 100644 --- a/RealmSwift/Impl/SchemaDiscovery.swift +++ b/RealmSwift/Impl/SchemaDiscovery.swift @@ -156,7 +156,7 @@ private func getLegacyProperties(_ object: ObjectBase, _ cls: ObjectBase.Type) - if class_getProperty(cls, label) != nil { throwRealmException("Property \(cls).\(label) is declared as \(type(of: prop.value)), which is not a supported managed Object property type. If it is not supposed to be a managed property, either add it to `ignoredProperties()` or do not declare it as `@objc dynamic`. See https://www.mongodb.com/docs/realm-sdks/swift/latest/Classes/Object.html for more information.") } - if prop.value as? RealmOptionalProtocol != nil { + if prop.value is RealmOptionalProtocol { throwRealmException("Property \(cls).\(label) has unsupported RealmOptional type \(type(of: prop.value)). Extending RealmOptionalType with custom types is not currently supported. ") } return nil diff --git a/RealmSwift/ObjectId.swift b/RealmSwift/ObjectId.swift index 9a7b6f47dd..43ea59e018 100644 --- a/RealmSwift/ObjectId.swift +++ b/RealmSwift/ObjectId.swift @@ -70,6 +70,7 @@ public final class ObjectId: RLMObjectId, Decodable, @unchecked Sendable { /// /// Aborts if the string is not 24 characters or contains any characters other than 0-9a-fA-F. Use the initializer which takes a String to handle invalid strings at runtime. public required init(_ str: StaticString) { + // swiftlint:disable:next optional_data_string_conversion try! super.init(string: str.withUTF8Buffer { String(decoding: $0, as: UTF8.self) }) } diff --git a/RealmSwift/Realm.swift b/RealmSwift/Realm.swift index c41a038acd..499fa4695f 100644 --- a/RealmSwift/Realm.swift +++ b/RealmSwift/Realm.swift @@ -1404,7 +1404,7 @@ extension Realm { @discardableResult @_unsafeInheritExecutor public func asyncRefresh() async -> Bool { - guard rlmRealm.actor as? Actor != nil else { + guard rlmRealm.actor is Actor else { fatalError("asyncRefresh() can only be called on main thread or actor-isolated Realms") } guard let task = RLMRealmRefreshAsync(rlmRealm) else { diff --git a/RealmSwift/Tests/CodableTests.swift b/RealmSwift/Tests/CodableTests.swift index 48193bed3e..567113ca3d 100644 --- a/RealmSwift/Tests/CodableTests.swift +++ b/RealmSwift/Tests/CodableTests.swift @@ -305,10 +305,10 @@ class CodableTests: TestCase, @unchecked Sendable { func encode(_ value: T?) -> String { let opt = RealmOptional() opt.value = value - return try! String(decoding: encoder.encode([opt]), as: UTF8.self) + return try! String(data: encoder.encode([opt]), encoding: .utf8)! } func encode(_ value: T?) -> String { - return try! String(decoding: encoder.encode([value]), as: UTF8.self) + return try! String(data: encoder.encode([value]), encoding: .utf8)! } func legacyObjectString(_ nullRealmProperty: Bool = false) -> String { @@ -1535,7 +1535,6 @@ class CodableTests: TestCase, @unchecked Sendable { // Verify that it encodes to exactly the original string (which requires // that the original string be formatted how JSONEncoder formats things) encoder.outputFormatting = [.prettyPrinted, .sortedKeys] - // swiftlint:disable:next non_optional_string_data_conversion let actual = try XCTUnwrap(String(data: encoder.encode(obj), encoding: .utf8)) XCTAssertEqual(str, actual) @@ -2221,7 +2220,6 @@ class CodableTests: TestCase, @unchecked Sendable { // Verify that it encodes to exactly the original string (which requires // that the original string be formatted how JSONEncoder formats things) encoder.outputFormatting = [.prettyPrinted, .sortedKeys] - // swiftlint:disable:next non_optional_string_data_conversion let actual = try String(data: encoder.encode(obj), encoding: .utf8) XCTAssertEqual(str, actual) } @@ -2431,7 +2429,6 @@ class CodableTests: TestCase, @unchecked Sendable { obj.objectId = ObjectId("1234567890abcdef12345678") obj.uuid = UUID(uuidString: "00000000-0000-0000-0000-000000000000")! obj.date = Date(timeIntervalSince1970: 0) - // swiftlint:disable:next non_optional_string_data_conversion let actual = try XCTUnwrap(String(data: encoder.encode(obj), encoding: .utf8)) // Before the 2024 OS versions, int8 was sorted before int16 let expected = if #available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, *) { diff --git a/RealmSwift/Tests/TestUtils.swift b/RealmSwift/Tests/TestUtils.swift index 0d8745f6fc..fc00b44eac 100644 --- a/RealmSwift/Tests/TestUtils.swift +++ b/RealmSwift/Tests/TestUtils.swift @@ -272,7 +272,6 @@ public func assertPreconditionFailure(_ message: String, _ expression: () asy guard let data = try pipe.fileHandleForReading.readToEnd() else { return XCTFail("Expected child process to crash with message \"\(message)\", but it exited without printing anything", file: file, line: line) } - // swiftlint:disable:next non_optional_string_data_conversion guard let str = String(data: data, encoding: .utf8) else { return XCTFail("Expected child process to crash with message \"\(message)\", but it did not print valid utf-8", file: file, line: line) } @@ -349,7 +348,6 @@ public func assertPreconditionFailure( guard let data = try pipe.fileHandleForReading.readToEnd() else { return XCTFail("Expected child process to crash with message \"\(message)\", but it exited without printing anything", file: file, line: line) } - // swiftlint:disable:next non_optional_string_data_conversion guard let str = String(data: data, encoding: .utf8) else { return XCTFail("Expected child process to crash with message \"\(message)\", but it did not print valid utf-8", file: file, line: line) } diff --git a/dependencies.list b/dependencies.list index e54a052572..ac1e75d43d 100755 --- a/dependencies.list +++ b/dependencies.list @@ -1,3 +1,3 @@ VERSION=10.53.1 -REALM_CORE_VERSION=v14.12.1 +REALM_CORE_VERSION=v14.13.0 STITCH_VERSION=c794ec6e2b751ef0cb5ab35256b07f5fa0c74c3a diff --git a/scripts/pr-ci-matrix.rb b/scripts/pr-ci-matrix.rb index 072a0a38cd..491c4360dc 100755 --- a/scripts/pr-ci-matrix.rb +++ b/scripts/pr-ci-matrix.rb @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -XCODE_VERSIONS = %w(15.3 15.4 16_Release_Candidate 16.1_beta) +XCODE_VERSIONS = %w(15.3 15.4 16 16.1_beta_2) DOC_VERSION = '15.4' all = ->(v) { true }