From 80eeb8de5451596d1c443056984d8a83bf3331e0 Mon Sep 17 00:00:00 2001 From: Jung gyun Ahn Date: Tue, 30 May 2023 15:08:15 +0900 Subject: [PATCH] Fix compile errors. (#71) * fix xcodebuild compile errors * Set the minimum iOS version to 13.0 --- Sources/Document/CRDT/RGATreeSplit.swift | 1 + Tests/Integration/ClientIntegrationTests.swift | 3 +++ Tests/Integration/CounterIntegrationTests.swift | 2 ++ Tests/Unit/API/V1/ConverterTests.swift | 1 + Tests/Unit/Document/DocumentTests.swift | 2 ++ Yorkie.xcodeproj/project.pbxproj | 10 ++++++++-- 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Sources/Document/CRDT/RGATreeSplit.swift b/Sources/Document/CRDT/RGATreeSplit.swift index 5a5488c0..77bc6164 100644 --- a/Sources/Document/CRDT/RGATreeSplit.swift +++ b/Sources/Document/CRDT/RGATreeSplit.swift @@ -831,6 +831,7 @@ extension RGATreeSplit: Sequence { self.head = self.head?.next return next } + // swiftlint: enable nesting } } diff --git a/Tests/Integration/ClientIntegrationTests.swift b/Tests/Integration/ClientIntegrationTests.swift index 7d55ca8e..fe2979c5 100644 --- a/Tests/Integration/ClientIntegrationTests.swift +++ b/Tests/Integration/ClientIntegrationTests.swift @@ -208,6 +208,7 @@ final class ClientIntegrationTests: XCTestCase { // swiftlint: disable identifier_name var x: Int var y: Int + // swiftlint: enable identifier_name } struct PresenceType: Codable { @@ -319,6 +320,8 @@ final class ClientIntegrationTests: XCTestCase { try await c2.deactivate() } + // swiftlint: enable force_cast + func test_client_pause_resume() async throws { let c1 = Client(rpcAddress: self.rpcAddress, options: ClientOptions()) diff --git a/Tests/Integration/CounterIntegrationTests.swift b/Tests/Integration/CounterIntegrationTests.swift index 06d08ff2..adf83e8e 100644 --- a/Tests/Integration/CounterIntegrationTests.swift +++ b/Tests/Integration/CounterIntegrationTests.swift @@ -165,3 +165,5 @@ final class CounterIntegrationTests: XCTestCase { try await self.c2.deactivate() } } + +// swiftlint: enable force_cast diff --git a/Tests/Unit/API/V1/ConverterTests.swift b/Tests/Unit/API/V1/ConverterTests.swift index 246563b2..780129b5 100644 --- a/Tests/Unit/API/V1/ConverterTests.swift +++ b/Tests/Unit/API/V1/ConverterTests.swift @@ -365,5 +365,6 @@ class ConverterTests: XCTestCase { XCTAssertEqual(presence.clock, converted.clock) // swiftlint: disable force_cast XCTAssert((presence.data as NSDictionary).isEqual(to: (converted.data as NSDictionary) as! [AnyHashable: Any])) + // swiftlint: enable force_cast } } diff --git a/Tests/Unit/Document/DocumentTests.swift b/Tests/Unit/Document/DocumentTests.swift index 336e0746..3d9d9aa3 100644 --- a/Tests/Unit/Document/DocumentTests.swift +++ b/Tests/Unit/Document/DocumentTests.swift @@ -247,6 +247,8 @@ class DocumentTests: XCTestCase { """) } + // swiftlint: enable function_body_length + func test_splice_array_with_string() async throws { let target = Document(key: "test-doc") try await target.update { root in diff --git a/Yorkie.xcodeproj/project.pbxproj b/Yorkie.xcodeproj/project.pbxproj index 44a8147f..f353b173 100644 --- a/Yorkie.xcodeproj/project.pbxproj +++ b/Yorkie.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ 9A6399A7294C7E1E00BF27F5 /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = 9A6399A6294C7E1E00BF27F5 /* Logging */; }; 9A66B19E295446BF00D10B94 /* RGATreeSplit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A66B19D295446BF00D10B94 /* RGATreeSplit.swift */; }; 9A66B1A02955833E00D10B94 /* LLRBTree.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A66B19F2955833E00D10B94 /* LLRBTree.swift */; }; + 9A7C75EA2A0261E7000B6E5A /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A7C75E92A0261DD000B6E5A /* Version.swift */; }; 9A8150522967FCD700DFADFB /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A8150512967FCD700DFADFB /* Helper.swift */; }; 9AD6E7E329C190E7001A1F89 /* resources.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD6E7DE29C190E7001A1F89 /* resources.pb.swift */; }; 9AD6E7E529C190E7001A1F89 /* yorkie.grpc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD6E7E029C190E7001A1F89 /* yorkie.grpc.swift */; }; @@ -139,6 +140,7 @@ 9A4DC744292DD82500C89478 /* YorkieCountable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YorkieCountable.swift; sourceTree = ""; }; 9A66B19D295446BF00D10B94 /* RGATreeSplit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RGATreeSplit.swift; sourceTree = ""; }; 9A66B19F2955833E00D10B94 /* LLRBTree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LLRBTree.swift; sourceTree = ""; }; + 9A7C75E92A0261DD000B6E5A /* Version.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Version.swift; sourceTree = ""; }; 9A8150512967FCD700DFADFB /* Helper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Helper.swift; sourceTree = ""; }; 9AD6E7DE29C190E7001A1F89 /* resources.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = resources.pb.swift; sourceTree = ""; }; 9AD6E7DF29C190E7001A1F89 /* yorkie.proto */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.protobuf; path = yorkie.proto; sourceTree = ""; }; @@ -271,6 +273,7 @@ 96DA808428C5B7B400E2C1DA /* Sources */ = { isa = PBXGroup; children = ( + 9A7C75E92A0261DD000B6E5A /* Version.swift */, CE6071E828C5EC2500A8783E /* API */, CE8C22E328C9E53400432DE5 /* Core */, CE8C22E428C9E53E00432DE5 /* Document */, @@ -772,6 +775,7 @@ 9ADAEE5A29657E03007E9F9F /* EditOperation.swift in Sources */, CEA2DA4628F68D0A00431B61 /* ChangeID.swift in Sources */, 9A66B19E295446BF00D10B94 /* RGATreeSplit.swift in Sources */, + 9A7C75EA2A0261E7000B6E5A /* Version.swift in Sources */, CE7B997A28E2820200D56198 /* RGATreeList.swift in Sources */, CE8C230728D1514900432DE5 /* Logger.swift in Sources */, 9A4DC737292273D200C89478 /* CRDTCounter.swift in Sources */, @@ -928,7 +932,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -986,7 +990,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -1009,6 +1013,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1034,6 +1039,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks",