From 07c8b40a9ccbea90fc9941c89520e758df1b9920 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 10 Oct 2019 09:26:32 -0400 Subject: [PATCH 1/2] Fix compile on Linux Swift 5.1 --- Sources/NSURLSession+Promise.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/NSURLSession+Promise.swift b/Sources/NSURLSession+Promise.swift index 13259a0..150654f 100644 --- a/Sources/NSURLSession+Promise.swift +++ b/Sources/NSURLSession+Promise.swift @@ -2,6 +2,11 @@ import Foundation #if !PMKCocoaPods import PromiseKit #endif +#if swift(>=4.1) +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif +#endif /** To import the `NSURLSession` category: From 9916671b80fba36721a4dac928bf011f680684cc Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 10 Oct 2019 09:29:12 -0400 Subject: [PATCH 2/2] Test Swift 5.1 --- .travis.yml | 21 ++++++++++++++++----- Cartfile.resolved | 2 +- Package.resolved | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2a7f2e..a3e84dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ jobs: osx_image: xcode8.3 env: SWIFT=3.1 before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 + gem install cocoapods --version '~> 1.8.0' install: carthage bootstrap --no-build PromiseKit script: | @@ -47,7 +47,10 @@ jobs: - <<: *pod osx_image: xcode10.2 env: SWIFT=5.0 - + - <<: *pod + osx_image: xcode11 + env: SWIFT=5.1 + - &linux stage: swiftpm env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0 @@ -86,7 +89,10 @@ jobs: - <<: *linux env: SWIFT_BUILD_VERSION=5 SWIFT_VERSION=5.0 name: Linux / Swift 5.0 - + - <<: *linux + env: SWIFT_BUILD_VERSION=5 SWIFT_VERSION=5.1 + name: Linux / Swift 5.1 + - &swiftpm stage: swiftpm name: Xcode 8.3 / SwiftPM @@ -100,7 +106,10 @@ jobs: - <<: *swiftpm name: Xcode 10.0 / SwiftPM osx_image: xcode10 - + - <<: *swiftpm + name: Xcode 11.0 / SwiftPM + osx_image: xcode11 + - &carthage stage: carthage osx_image: xcode9.2 @@ -117,7 +126,9 @@ jobs: osx_image: xcode10.1 - <<: *carthage osx_image: xcode10.2 - + - <<: *carthage + osx_image: xcode11 + - &test stage: test xcode_scheme: PMKFoundation diff --git a/Cartfile.resolved b/Cartfile.resolved index 99f18cf..47a3dc3 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ github "AliSoftware/OHHTTPStubs" "7.0.0" -github "mxcl/PromiseKit" "6.8.4" +github "mxcl/PromiseKit" "6.11.0" diff --git a/Package.resolved b/Package.resolved index ed8bd26..4225bb9 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/mxcl/PromiseKit.git", "state": { "branch": null, - "revision": "e0176e7886b3bef5b9a546bcc6b357f6f569f222", + "revision": "fe1e9c5b62465227cceb7b0e6e79489ba7b824af", "version": "6.8.4" } }