From 253b58c3431c0be58ba9c9b903e7a8bbff2c164a Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Tue, 10 Sep 2019 19:13:19 +0530 Subject: [PATCH 01/15] Migrated to Swift 5 --- Cartfile | 2 +- Cartfile.private | 2 +- Tyro.xcodeproj/project.pbxproj | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cartfile b/Cartfile index 01417a0..5f317d0 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "typelift/Swiftz" ~> 0.7.0 +github "typelift/Swiftz" ~> 0.8.0 diff --git a/Cartfile.private b/Cartfile.private index 5157273..c8db81d 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1 +1 @@ -github "typelift/SwiftCheck" ~> 0.8.1 +github "typelift/SwiftCheck" ~> 0.12.0 diff --git a/Tyro.xcodeproj/project.pbxproj b/Tyro.xcodeproj/project.pbxproj index a9a877f..1b3f195 100644 --- a/Tyro.xcodeproj/project.pbxproj +++ b/Tyro.xcodeproj/project.pbxproj @@ -799,6 +799,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = DE702CC61BFAC6820017CEE8; @@ -1560,7 +1561,7 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1583,7 +1584,7 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; From 2b087436379c84202f6f577d0049dc91cbce9d7c Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Tue, 10 Sep 2019 19:16:30 +0530 Subject: [PATCH 02/15] Updated README File --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 18d0639..d34d34a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ Tyro ====== -Tyro is a Swift library for Functional JSON parsing and encoding. It is now supported on this repo for Swift 4.2 but used +Tyro is a Swift library for Functional JSON parsing and encoding. It is now supported on this repo for Swift 5.0 but used to be maintained by [typelift](https://github.com/typelift/tyro). From b9e53693cdcb52494728cc217e086b047990d763 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 11 Sep 2019 11:50:29 +0530 Subject: [PATCH 03/15] Updated Xcode Version to support Swift 5 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 665a53b..83a4f8c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode10.1 +osx_image: xcode11 git: submodules: false before_install: From f8a1dc87b445d6740c28941edc39c0d1302bfe5b Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 11 Sep 2019 12:24:26 +0530 Subject: [PATCH 04/15] Commit Carthage Files --- Carthage/Checkouts/SwiftCheck | 2 +- Carthage/Checkouts/Swiftz | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Carthage/Checkouts/SwiftCheck b/Carthage/Checkouts/SwiftCheck index cf99580..077c096 160000 --- a/Carthage/Checkouts/SwiftCheck +++ b/Carthage/Checkouts/SwiftCheck @@ -1 +1 @@ -Subproject commit cf9958085b2ee1643e541e407c3233d1b76c18ff +Subproject commit 077c096c3ddfc38db223ac8e525ad16ffb987138 diff --git a/Carthage/Checkouts/Swiftz b/Carthage/Checkouts/Swiftz index 973ff0f..6cc1136 160000 --- a/Carthage/Checkouts/Swiftz +++ b/Carthage/Checkouts/Swiftz @@ -1 +1 @@ -Subproject commit 973ff0f61c424e9296fd45c2bff5e5e7582fd8fa +Subproject commit 6cc11367d8222486312846e460b3ec63d7e9018d From 8bc47082b40315cada274e888e3b8726c52c8762 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 11 Sep 2019 12:35:09 +0530 Subject: [PATCH 05/15] Changed Version of Swift in all the targets --- Tyro.xcodeproj/project.pbxproj | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Tyro.xcodeproj/project.pbxproj b/Tyro.xcodeproj/project.pbxproj index 1b3f195..e9890ed 100644 --- a/Tyro.xcodeproj/project.pbxproj +++ b/Tyro.xcodeproj/project.pbxproj @@ -1250,6 +1250,7 @@ PRODUCT_NAME = Tyro; SDKROOT = appletvos; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.2; }; @@ -1271,6 +1272,7 @@ PRODUCT_NAME = Tyro; SDKROOT = appletvos; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.2; }; @@ -1285,6 +1287,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.Tyro-tvOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Debug; @@ -1298,6 +1301,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.Tyro-tvOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Release; @@ -1319,6 +1323,7 @@ PRODUCT_NAME = Tyro; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.2; }; @@ -1341,6 +1346,7 @@ PRODUCT_NAME = Tyro; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.2; }; @@ -1397,7 +1403,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1448,7 +1454,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -1477,7 +1483,7 @@ PRODUCT_NAME = Tyro; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1501,7 +1507,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Tyro; PRODUCT_NAME = Tyro; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -1520,6 +1526,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.typelift.TyroTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Debug; @@ -1538,6 +1545,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.typelift.TyroTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -1601,7 +1609,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1618,7 +1626,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; From a417e6799bb6910848aec9e6caefde139baee886 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 11 Sep 2019 13:18:07 +0530 Subject: [PATCH 06/15] Fixed warnings --- Tyro.xcodeproj/project.pbxproj | 4 ++-- Tyro/EncodedTypes.swift | 4 ++-- Tyro/Enum.swift | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Tyro.xcodeproj/project.pbxproj b/Tyro.xcodeproj/project.pbxproj index e9890ed..5be97ce 100644 --- a/Tyro.xcodeproj/project.pbxproj +++ b/Tyro.xcodeproj/project.pbxproj @@ -796,11 +796,11 @@ }; buildConfigurationList = DE702CCA1BFAC6820017CEE8 /* Build configuration list for PBXProject "Tyro" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, en, + Base, ); mainGroup = DE702CC61BFAC6820017CEE8; productRefGroup = DE702CD11BFAC6830017CEE8 /* Products */; diff --git a/Tyro/EncodedTypes.swift b/Tyro/EncodedTypes.swift index 0fa5d27..c4758a7 100644 --- a/Tyro/EncodedTypes.swift +++ b/Tyro/EncodedTypes.swift @@ -16,7 +16,7 @@ public struct FromJSONArray: FromJSON where B.T == A { case .Array(let values): return values.compactMap(B.fromJSON).lift().either(onLeft: { .Left(.Array($0)) }, onRight: Either.Right) default: - return .Left(.TypeMismatch("\(JSONValue.Array.self)", "\(type(of: value))")) + return .Left(.TypeMismatch("\(String(describing: JSONValue.Array.self))", "\(type(of: value))")) } } } @@ -36,7 +36,7 @@ public struct FromJSONDictionary: FromJSON where B.T == A { case .Object(let value): return value.mapMaybe(B.fromJSON).lift().either(onLeft: { .Left(.Array($0)) }, onRight: Either.Right) default: - return .Left(.TypeMismatch("\(JSONValue.Object.self)", "\(type(of: value).self)")) + return .Left(.TypeMismatch("\(String(describing: JSONValue.Object.self))", "\(type(of: value).self)")) } } } diff --git a/Tyro/Enum.swift b/Tyro/Enum.swift index 88d9b88..a398e8f 100644 --- a/Tyro/Enum.swift +++ b/Tyro/Enum.swift @@ -17,7 +17,7 @@ extension FromJSON where Self : RawRepresentable, Self.RawValue == Int { let x : T? = self.init(rawValue : n) as? T return x.toEither(.Custom("Raw value could not be converted")) default: - return .Left(.TypeMismatch("\(JSONValue.Number.self)","\(value.self)")) + return .Left(.TypeMismatch("\(String(describing: JSONValue.Number.self))","\(value.self)")) } } } @@ -37,7 +37,7 @@ extension FromJSON where Self : RawRepresentable, Self.RawValue == String { let x : T? = self.init(rawValue : s) as? T return x.toEither(.Custom("Raw value could not be converted")) default: - return .Left(.TypeMismatch("\(JSONValue.Number.self)","\(value.self)")) + return .Left(.TypeMismatch("\(String(describing: JSONValue.Number.self))","\(value.self)")) } } } From e1fed2b45c0c4f21c10f2aa51c0821fb4ee44d45 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 11 Sep 2019 13:43:59 +0530 Subject: [PATCH 07/15] Change the name of watch supported by Xcode 11 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 83a4f8c..38e6a23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ script: - xcodebuild clean -scheme Tyro-iOS -configuration Debug -sdk iphonesimulator - xcodebuild test -scheme Tyro-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty -c - xcodebuild clean -scheme Tyro-tvOS - - xcodebuild build -scheme Tyro-watchOS -destination 'platform=watchOS Simulator,name=Apple Watch - 42mm' | xcpretty -c + - xcodebuild build -scheme Tyro-watchOS -destination 'platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm' | xcpretty -c # deploy: # provider: script # script: ./scripts/push.sh From e8ee0e3243646a00e2dd5467ce375a163be036f3 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 11 Sep 2019 15:13:20 +0530 Subject: [PATCH 08/15] changed simulator device for Swift 5 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 38e6a23..6e14487 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ script: - set -o pipefail - xcodebuild test -scheme Tyro -configuration Debug | xcpretty -c - xcodebuild clean -scheme Tyro -configuration Debug - - xcodebuild test -scheme Tyro-iOS -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6s" | xcpretty -c + - xcodebuild test -scheme Tyro-iOS -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 8" | xcpretty -c - xcodebuild clean -scheme Tyro-iOS -configuration Debug -sdk iphonesimulator - xcodebuild test -scheme Tyro-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty -c - xcodebuild clean -scheme Tyro-tvOS From 5fa179dbae77e5d4ef4ed155dc9e86a719c94ab1 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 11 Sep 2019 20:04:47 +0530 Subject: [PATCH 09/15] changed urls to my repo and Xcode 11 support --- .gitmodules | 4 ++-- Cartfile | 2 +- Cartfile.private | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index d1bd3a5..43fda42 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "Carthage/Checkouts/Swiftz"] - url = https://github.com/typelift/Swiftz.git + url = https://github.com/pushp1989/Swiftz.git path = Carthage/Checkouts/Swiftz [submodule "Carthage/Checkouts/SwiftCheck"] path = Carthage/Checkouts/SwiftCheck - url = https://github.com/typelift/SwiftCheck.git + url = https://github.com/pushp1989/SwiftCheck.git diff --git a/Cartfile b/Cartfile index 5f317d0..ef1327f 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "typelift/Swiftz" ~> 0.8.0 +github "https://github.com/pushp1989/Swiftz.git" diff --git a/Cartfile.private b/Cartfile.private index c8db81d..2a178fb 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1 +1 @@ -github "typelift/SwiftCheck" ~> 0.12.0 +github "https://github.com/pushp1989/SwiftCheck.git" From ef337cd7f0d7a3e4febae2e9da543a1708813308 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Thu, 12 Sep 2019 12:46:59 +0530 Subject: [PATCH 10/15] Remove modern from build system --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e14487..421421d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,11 +11,11 @@ script: - set -o pipefail - xcodebuild test -scheme Tyro -configuration Debug | xcpretty -c - xcodebuild clean -scheme Tyro -configuration Debug - - xcodebuild test -scheme Tyro-iOS -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 8" | xcpretty -c + - xcodebuild test -scheme Tyro-iOS -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 8" -UseModernBuildSystem=NO | xcpretty -c - xcodebuild clean -scheme Tyro-iOS -configuration Debug -sdk iphonesimulator - - xcodebuild test -scheme Tyro-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty -c + - xcodebuild test -scheme Tyro-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' -UseModernBuildSystem=NO | xcpretty -c - xcodebuild clean -scheme Tyro-tvOS - - xcodebuild build -scheme Tyro-watchOS -destination 'platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm' | xcpretty -c + - xcodebuild build -scheme Tyro-watchOS -destination 'platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm' -UseModernBuildSystem=NO | xcpretty -c # deploy: # provider: script # script: ./scripts/push.sh From 8c5ebc4aff97fa9abb77bb8970b3e45da703ae80 Mon Sep 17 00:00:00 2001 From: pushp1989 <54930194+pushp1989@users.noreply.github.com> Date: Thu, 12 Sep 2019 14:42:12 +0530 Subject: [PATCH 11/15] Update Cartfile replaced url with repo name --- Cartfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cartfile b/Cartfile index ef1327f..22a7554 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "https://github.com/pushp1989/Swiftz.git" +github "pushp1989/Swiftz" From d716d43fe13d975038a2c7eaefd7a495ba6b13d5 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Thu, 12 Sep 2019 16:16:51 +0530 Subject: [PATCH 12/15] changed git url --- Cartfile | 2 +- Cartfile.private | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index ef1327f..22a7554 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "https://github.com/pushp1989/Swiftz.git" +github "pushp1989/Swiftz" diff --git a/Cartfile.private b/Cartfile.private index 2a178fb..d93ea1c 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1 +1 @@ -github "https://github.com/pushp1989/SwiftCheck.git" +github "pushp1989/SwiftCheck" From 8b07a037962ab1c27f929e15a2e74942cfe09d57 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Tue, 17 Sep 2019 23:37:09 +0530 Subject: [PATCH 13/15] Updated Swiftz framework identifier --- Cartfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cartfile b/Cartfile index 22a7554..0bff0c9 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "pushp1989/Swiftz" +github "pushp1989/Swiftz" "62983529453167743047c6911ad5d40e9cd87014" From 74892af294da980387649de370c806b0d58716aa Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 18 Sep 2019 13:42:42 +0530 Subject: [PATCH 14/15] Update Swift new version with swiftcheck lastest version --- Cartfile | 2 +- Cartfile.private | 2 +- Carthage/Checkouts/SwiftCheck | 2 +- Carthage/Checkouts/Swiftz | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cartfile b/Cartfile index 0bff0c9..0487ee3 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "pushp1989/Swiftz" "62983529453167743047c6911ad5d40e9cd87014" +github "pushp1989/Swiftz" "f5b9278eeaaeb2b4ef181616c15e03fdc6070771" diff --git a/Cartfile.private b/Cartfile.private index d93ea1c..4ba6a51 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1 +1 @@ -github "pushp1989/SwiftCheck" +github "pushp1989/SwiftCheck" "cfe6eb2a27097ff071f278d3c0f40fa11e42b0aa" diff --git a/Carthage/Checkouts/SwiftCheck b/Carthage/Checkouts/SwiftCheck index 077c096..cfe6eb2 160000 --- a/Carthage/Checkouts/SwiftCheck +++ b/Carthage/Checkouts/SwiftCheck @@ -1 +1 @@ -Subproject commit 077c096c3ddfc38db223ac8e525ad16ffb987138 +Subproject commit cfe6eb2a27097ff071f278d3c0f40fa11e42b0aa diff --git a/Carthage/Checkouts/Swiftz b/Carthage/Checkouts/Swiftz index 6cc1136..f5b9278 160000 --- a/Carthage/Checkouts/Swiftz +++ b/Carthage/Checkouts/Swiftz @@ -1 +1 @@ -Subproject commit 6cc11367d8222486312846e460b3ec63d7e9018d +Subproject commit f5b9278eeaaeb2b4ef181616c15e03fdc6070771 From 2acbf2183c6f1628f200eda68925a77f55b3d225 Mon Sep 17 00:00:00 2001 From: Pushpendra Date: Wed, 18 Sep 2019 14:39:25 +0530 Subject: [PATCH 15/15] Latest Swiftz version --- Cartfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cartfile b/Cartfile index 0487ee3..2f1885f 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "pushp1989/Swiftz" "f5b9278eeaaeb2b4ef181616c15e03fdc6070771" +github "pushp1989/Swiftz" "f6c693a7a5caa77628b561be366808e9bc438caa"