From 7150ec16538e35c2042a5bb9fa3461895e965cfe Mon Sep 17 00:00:00 2001 From: james-lukanta-ck Date: Thu, 19 Apr 2018 20:33:31 -0700 Subject: [PATCH 1/5] Update ReactiveSwift to 3.1 and ReactiveCocoa to 7.1 --- .swift-version | 2 +- .travis.yml | 4 ++-- Cartfile | 4 ++-- Cartfile.resolved | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.swift-version b/.swift-version index 8c50098..7d5c902 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.1 +4.1 diff --git a/.travis.yml b/.travis.yml index 62d90ab..8e79be7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: objective-c cache: cocoapods -osx_image: xcode8.3 +osx_image: xcode9.3 before_install: - brew uninstall carthage - - HOMEBREW_NO_AUTO_UPDATE=1 brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6ae4f69a652fb0ecb102b0c9216378679a4f1b92/Formula/carthage.rb # 0.22.0 + - HOMEBREW_NO_AUTO_UPDATE=1 brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/45dd24d8dfa7a2fb69812c678ceb34be0c16e295/Formula/carthage.rb # 0.29.0 branches: only: - master diff --git a/Cartfile b/Cartfile index 01d5496..58907e1 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -github "ReactiveCocoa/ReactiveSwift" ~> 2.0 -github "ReactiveCocoa/ReactiveCocoa" ~> 6.0 +github "ReactiveCocoa/ReactiveSwift" ~> 3.1 +github "ReactiveCocoa/ReactiveCocoa" ~> 7.1 diff --git a/Cartfile.resolved b/Cartfile.resolved index 5155c18..5adf965 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,6 +1,6 @@ -github "Quick/Nimble" "v7.0.1" -github "Quick/Quick" "v1.1.0" -github "ReactiveCocoa/ReactiveCocoa" "6.0.0" -github "ReactiveCocoa/ReactiveSwift" "2.0.0" -github "antitypical/Result" "3.2.3" +github "Quick/Nimble" "v7.1.1" +github "Quick/Quick" "v1.2.0" +github "ReactiveCocoa/ReactiveCocoa" "7.2.0" +github "ReactiveCocoa/ReactiveSwift" "3.1.0" +github "antitypical/Result" "3.2.4" github "jspahrsummers/xcconfigs" "0.10" From 82442a60857b2e542dd5333a490df24df0c9bb0a Mon Sep 17 00:00:00 2001 From: james-lukanta-ck Date: Fri, 20 Apr 2018 11:21:28 -0700 Subject: [PATCH 2/5] Remove `before_install` --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e79be7..19e450e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,6 @@ language: objective-c cache: cocoapods osx_image: xcode9.3 -before_install: - - brew uninstall carthage - - HOMEBREW_NO_AUTO_UPDATE=1 brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/45dd24d8dfa7a2fb69812c678ceb34be0c16e295/Formula/carthage.rb # 0.29.0 branches: only: - master From 74d26a6db69ab357613f0c49f07ffd9a5dda41d5 Mon Sep 17 00:00:00 2001 From: james-lukanta-ck Date: Fri, 20 Apr 2018 11:41:09 -0700 Subject: [PATCH 3/5] Update `XCODE_DESTINATION` in `/script/build` and ReactiveSwift's `majorVersion` in `Package.swift` --- Package.swift | 2 +- script/build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index a74c4d4..6775093 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let package = Package( name: "ReactiveCollections", dependencies: { var deps: [Package.Dependency] = [ - .Package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", majorVersion: 2), + .Package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", majorVersion: 3), ] if isSwiftPackagerManagerTest { deps += [ diff --git a/script/build b/script/build index 315cd1d..32ee62d 100755 --- a/script/build +++ b/script/build @@ -52,7 +52,7 @@ fi if [[ "$TRAVIS_XCODE_SCHEME" == "ReactiveCollections-tvOS" ]]; then XCODE_SDK=appletvsimulator XCODE_ACTION="build-for-testing test-without-building" - XCODE_DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p" + XCODE_DESTINATION="platform=tvOS Simulator,name=Apple TV 4K (at 1080p)" fi if [[ "$TRAVIS_XCODE_SCHEME" == "ReactiveCollections-watchOS" ]]; then From 281f0c17760da00c09c6bc8b10a79b9b7f76874c Mon Sep 17 00:00:00 2001 From: james-lukanta-ck Date: Fri, 20 Apr 2018 13:21:39 -0700 Subject: [PATCH 4/5] Update podspec --- ReactiveCollections.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactiveCollections.podspec b/ReactiveCollections.podspec index ff5d5bb..2f7d03a 100644 --- a/ReactiveCollections.podspec +++ b/ReactiveCollections.podspec @@ -14,6 +14,6 @@ Pod::Spec.new do |s| # Directory glob for all Swift files s.source_files = "Sources/*.{swift}" - s.dependency 'ReactiveSwift', '~> 2.0' - s.dependency 'ReactiveCocoa', '~> 6.0' + s.dependency 'ReactiveSwift', '~> 3.1' + s.dependency 'ReactiveCocoa', '~> 7.1' end From 7bd06fef4050a128311572530bfae7b4a53fb55a Mon Sep 17 00:00:00 2001 From: james-lukanta-ck Date: Fri, 20 Apr 2018 13:50:38 -0700 Subject: [PATCH 5/5] Remove `toIntMax()` because it's no longer supported in Swift 4 --- ReactiveCollections.xcodeproj/project.pbxproj | 8 ++++---- Sources/ReactiveArray.swift | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ReactiveCollections.xcodeproj/project.pbxproj b/ReactiveCollections.xcodeproj/project.pbxproj index dd81eb7..798059a 100644 --- a/ReactiveCollections.xcodeproj/project.pbxproj +++ b/ReactiveCollections.xcodeproj/project.pbxproj @@ -918,7 +918,7 @@ PRODUCT_NAME = ReactiveCollections; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VERSIONING_SYSTEM = "apple-generic"; @@ -973,7 +973,7 @@ PRODUCT_NAME = ReactiveCollections; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; @@ -1296,7 +1296,7 @@ PRODUCT_NAME = ReactiveCollections; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VERSIONING_SYSTEM = "apple-generic"; @@ -1481,7 +1481,7 @@ PRODUCT_NAME = ReactiveCollections; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; diff --git a/Sources/ReactiveArray.swift b/Sources/ReactiveArray.swift index 89b7c4e..6b2e9c5 100644 --- a/Sources/ReactiveArray.swift +++ b/Sources/ReactiveArray.swift @@ -102,7 +102,7 @@ extension ReactiveArray { public mutating func replaceSubrange(_ subrange: Range, with newElements: C) where C: Collection, C.Iterator.Element == Element { elements.replaceSubrange(subrange, with: newElements) - let elementsCount = Int(newElements.count.toIntMax()) + let elementsCount = newElements.count if subrange.count > elementsCount { let deleteCount = subrange.count - elementsCount