Permalink
Browse files

Xcode 10.2 / Swift 5 support

Note we had to bump the Xcodeproj to Swift 4, which is thew new minimum that is supported for Xcode 10.2.

This will affect Carthage users.
  • Loading branch information...
mxcl committed Jan 24, 2019
1 parent 5e80127 commit 65c42e2e1336b2367de3a34a4dd569f36d4c0b48
Showing with 12 additions and 13 deletions.
  1. +6 −0 Documentation/Installation.md
  2. +3 −12 PromiseKit.xcodeproj/project.pbxproj
  3. +3 −1 Tests/CorePromise/ResolverTests.swift
@@ -37,6 +37,12 @@ CocoaPods are aware of this [issue](https://github.com/CocoaPods/CocoaPods/issue
github "mxcl/PromiseKit" ~> 6.8
```

> Please note, since PromiseKit 6.8.1 our Carthage support has transitioned to
Swift 4 and above only. Strictly we *do* still support Swift 3.1 for Carthage,
and if you like you could edit the PromiseKit `project.pbxproj` file during
`carthage bootstrap` to make this possible. This change was involuntary and due
to Xcode 10.2 dropping support for Swift 3.
## SwiftPM

```swift
@@ -650,6 +650,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 6399A3711D595D9100D65233;
productRefGroup = 63B0AC581D595E1B00FA21D9 /* Products */;
@@ -819,7 +820,6 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Debug;
@@ -833,7 +833,6 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Release;
@@ -846,7 +845,6 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OBJC_BRIDGING_HEADER = Tests/Bridging/Infrastructure.h;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -858,7 +856,6 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OBJC_BRIDGING_HEADER = Tests/Bridging/Infrastructure.h;
SWIFT_VERSION = 4.0;
};
name = Release;
};
@@ -869,7 +866,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -880,7 +876,6 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks @loader_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_VERSION = 4.0;
};
name = Release;
};
@@ -893,7 +888,6 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_SUPPRESS_WARNINGS = YES;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -906,7 +900,6 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_SUPPRESS_WARNINGS = YES;
SWIFT_VERSION = 4.0;
};
name = Release;
};
@@ -964,7 +957,7 @@
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos watchsimulator iphonesimulator watchos iphoneos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
@@ -1021,7 +1014,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos watchsimulator iphonesimulator watchos iphoneos";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
@@ -1144,7 +1137,6 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -1157,7 +1149,6 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_VERSION = 4.0;
};
name = Release;
};
@@ -161,8 +161,10 @@ class WrapTests: XCTestCase {
}

func testVoidResolverFulfillAmbiguity() {
#if swift(>=4.1) || swift(>=3.3) && !swift(>=4.0)
#if !swift(>=5) && swift(>=4.1) || swift(>=3.3) && !swift(>=4.0)
// ^^ this doesn’t work with Swift < 3.3 for some reason
// ^^ this doesn’t work with Swift 5.0-beta1 for some reason
// reference: https://github.com/mxcl/PromiseKit/issues/990
func foo(success: () -> Void, failure: (Error) -> Void) {

0 comments on commit 65c42e2

Please sign in to comment.