Skip to content

Commit ba30334

Browse files
authored
Merge pull request #53 from CodaFi/bump
Update to Swift 4.1
2 parents 997d6e6 + 457bbf0 commit ba30334

15 files changed

+84
-80
lines changed

.travis.yml

+9-15
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ matrix:
55
include:
66
- os: osx
77
language: objective-c
8-
osx_image: xcode9
8+
osx_image: xcode9.3
99
before_install:
1010
- git submodule update --init --recursive
1111
script:
@@ -14,32 +14,26 @@ matrix:
1414
- carthage build --no-skip-current
1515
- os: osx
1616
language: objective-c
17-
osx_image: xcode9
17+
osx_image: xcode9.3
1818
before_install:
1919
- git submodule update --init --recursive
2020
script:
2121
- set -o pipefail
2222
- xcodebuild test -scheme Concurrent | xcpretty -c
23-
# !!!: Make sure desired device name & OS version are suitable for the Xcode version installed on osx_image
24-
- iOS_DEVICE_NAME="iPad Pro (12.9-inch)"
25-
- iOS_RUNTIME_VERSION="10.0"
26-
# Get simulator identifier for desired device/runtime pair
27-
- SIMULATOR_ID=$(xcrun instruments -s | grep -o "${iOS_DEVICE_NAME} (${iOS_RUNTIME_VERSION}) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/")
28-
- echo $SIMULATOR_ID
29-
- echo $iOS_DEVICE_NAME
30-
- echo $iOS_RUNTIME_VERSION
31-
- xcodebuild test -scheme Concurrent-iOS -destination "platform=iOS Simulator,name=${iOS_DEVICE_NAME},OS=${iOS_RUNTIME_VERSION}" | xcpretty -c
32-
- xcodebuild test -scheme Concurrent-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 1080p' | xcpretty -c
23+
- xcodebuild build-for-testing -scheme Concurrent-iOS -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (2nd generation)" | xcpretty -c
24+
- xcodebuild test -scheme Concurrent-iOS -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (2nd generation)" | xcpretty -c
25+
- xcodebuild build-for-testing -scheme Concurrent-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p)' | xcpretty -c
26+
- xcodebuild test -scheme Concurrent-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p)' | xcpretty -c
3327
- os: linux
3428
language: generic
3529
sudo: required
3630
dist: trusty
3731
before_install:
3832
- git submodule update --init --recursive
3933
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
40-
- wget https://swift.org/builds/swift-4.0-release/ubuntu1404/swift-4.0-RELEASE/swift-4.0-RELEASE-ubuntu14.04.tar.gz
41-
- tar xzf swift-4.0-RELEASE-ubuntu14.04.tar.gz
42-
- export PATH=${PWD}/swift-4.0-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
34+
- wget https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz
35+
- tar xzf swift-4.1-RELEASE-ubuntu14.04.tar.gz
36+
- export PATH=${PWD}/swift-4.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
4337
script:
4438
- swift test
4539
notifications:

Cartfile.resolved

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "typelift/SwiftCheck" "0.8.1"
1+
github "typelift/SwiftCheck" "0.10.0"

Carthage/Checkouts/SwiftCheck

Submodule SwiftCheck updated 56 files

Concurrent.xcodeproj/project.pbxproj

+35-17
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@
571571
isa = PBXProject;
572572
attributes = {
573573
LastSwiftUpdateCheck = 0800;
574-
LastUpgradeCheck = 0900;
574+
LastUpgradeCheck = 0930;
575575
ORGANIZATIONNAME = TypeLift;
576576
TargetAttributes = {
577577
82AA03FD1D7B206300DD3037 = {
@@ -591,11 +591,11 @@
591591
};
592592
8434F97F19E9CD76008D9909 = {
593593
CreatedOnToolsVersion = 6.1;
594-
LastSwiftMigration = 0800;
594+
LastSwiftMigration = 0930;
595595
};
596596
8434F98A19E9CD76008D9909 = {
597597
CreatedOnToolsVersion = 6.1;
598-
LastSwiftMigration = 0830;
598+
LastSwiftMigration = 0930;
599599
};
600600
84A53D391B1A8F1800E8A107 = {
601601
CreatedOnToolsVersion = 6.3.2;
@@ -922,7 +922,8 @@
922922
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
923923
SWIFT_INSTALL_OBJC_HEADER = NO;
924924
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
925-
SWIFT_VERSION = 3.0;
925+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
926+
SWIFT_VERSION = 4.0;
926927
TARGETED_DEVICE_FAMILY = 3;
927928
TVOS_DEPLOYMENT_TARGET = 9.0;
928929
};
@@ -949,7 +950,8 @@
949950
SDKROOT = appletvos;
950951
SKIP_INSTALL = YES;
951952
SWIFT_INSTALL_OBJC_HEADER = NO;
952-
SWIFT_VERSION = 3.0;
953+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
954+
SWIFT_VERSION = 4.0;
953955
TARGETED_DEVICE_FAMILY = 3;
954956
TVOS_DEPLOYMENT_TARGET = 9.0;
955957
VALIDATE_PRODUCT = YES;
@@ -973,7 +975,8 @@
973975
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
974976
SWIFT_INSTALL_OBJC_HEADER = NO;
975977
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
976-
SWIFT_VERSION = 3.0;
978+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
979+
SWIFT_VERSION = 4.0;
977980
TVOS_DEPLOYMENT_TARGET = 9.0;
978981
};
979982
name = Debug;
@@ -993,7 +996,8 @@
993996
PRODUCT_NAME = "$(TARGET_NAME)";
994997
SDKROOT = appletvos;
995998
SWIFT_INSTALL_OBJC_HEADER = NO;
996-
SWIFT_VERSION = 3.0;
999+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1000+
SWIFT_VERSION = 4.0;
9971001
TVOS_DEPLOYMENT_TARGET = 9.0;
9981002
VALIDATE_PRODUCT = YES;
9991003
};
@@ -1023,7 +1027,8 @@
10231027
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
10241028
SWIFT_INSTALL_OBJC_HEADER = NO;
10251029
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1026-
SWIFT_VERSION = 3.0;
1030+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1031+
SWIFT_VERSION = 4.0;
10271032
TARGETED_DEVICE_FAMILY = 4;
10281033
WATCHOS_DEPLOYMENT_TARGET = 2.0;
10291034
};
@@ -1051,7 +1056,8 @@
10511056
SDKROOT = watchos;
10521057
SKIP_INSTALL = YES;
10531058
SWIFT_INSTALL_OBJC_HEADER = NO;
1054-
SWIFT_VERSION = 3.0;
1059+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1060+
SWIFT_VERSION = 4.0;
10551061
TARGETED_DEVICE_FAMILY = 4;
10561062
VALIDATE_PRODUCT = YES;
10571063
WATCHOS_DEPLOYMENT_TARGET = 2.0;
@@ -1071,12 +1077,14 @@
10711077
CLANG_WARN_BOOL_CONVERSION = YES;
10721078
CLANG_WARN_COMMA = YES;
10731079
CLANG_WARN_CONSTANT_CONVERSION = YES;
1080+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
10741081
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
10751082
CLANG_WARN_EMPTY_BODY = YES;
10761083
CLANG_WARN_ENUM_CONVERSION = YES;
10771084
CLANG_WARN_INFINITE_RECURSION = YES;
10781085
CLANG_WARN_INT_CONVERSION = YES;
10791086
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1087+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
10801088
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
10811089
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
10821090
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -1126,12 +1134,14 @@
11261134
CLANG_WARN_BOOL_CONVERSION = YES;
11271135
CLANG_WARN_COMMA = YES;
11281136
CLANG_WARN_CONSTANT_CONVERSION = YES;
1137+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
11291138
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
11301139
CLANG_WARN_EMPTY_BODY = YES;
11311140
CLANG_WARN_ENUM_CONVERSION = YES;
11321141
CLANG_WARN_INFINITE_RECURSION = YES;
11331142
CLANG_WARN_INT_CONVERSION = YES;
11341143
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1144+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
11351145
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
11361146
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
11371147
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -1180,7 +1190,8 @@
11801190
SWIFT_INSTALL_OBJC_HEADER = NO;
11811191
SWIFT_OBJC_INTERFACE_HEADER_NAME = "";
11821192
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1183-
SWIFT_VERSION = 3.0;
1193+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1194+
SWIFT_VERSION = 4.0;
11841195
};
11851196
name = Debug;
11861197
};
@@ -1202,7 +1213,8 @@
12021213
SKIP_INSTALL = YES;
12031214
SWIFT_INSTALL_OBJC_HEADER = NO;
12041215
SWIFT_OBJC_INTERFACE_HEADER_NAME = "";
1205-
SWIFT_VERSION = 3.0;
1216+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1217+
SWIFT_VERSION = 4.0;
12061218
};
12071219
name = Release;
12081220
};
@@ -1227,7 +1239,8 @@
12271239
PRODUCT_NAME = "$(TARGET_NAME)";
12281240
SWIFT_INSTALL_OBJC_HEADER = NO;
12291241
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1230-
SWIFT_VERSION = 3.0;
1242+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1243+
SWIFT_VERSION = 4.0;
12311244
};
12321245
name = Debug;
12331246
};
@@ -1247,7 +1260,8 @@
12471260
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
12481261
PRODUCT_NAME = "$(TARGET_NAME)";
12491262
SWIFT_INSTALL_OBJC_HEADER = NO;
1250-
SWIFT_VERSION = 3.0;
1263+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1264+
SWIFT_VERSION = 4.0;
12511265
};
12521266
name = Release;
12531267
};
@@ -1278,7 +1292,8 @@
12781292
SWIFT_INSTALL_OBJC_HEADER = NO;
12791293
SWIFT_OBJC_INTERFACE_HEADER_NAME = "";
12801294
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1281-
SWIFT_VERSION = 3.0;
1295+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1296+
SWIFT_VERSION = 4.0;
12821297
TARGETED_DEVICE_FAMILY = "1,2";
12831298
};
12841299
name = Debug;
@@ -1305,7 +1320,8 @@
13051320
SKIP_INSTALL = YES;
13061321
SWIFT_INSTALL_OBJC_HEADER = NO;
13071322
SWIFT_OBJC_INTERFACE_HEADER_NAME = "";
1308-
SWIFT_VERSION = 3.0;
1323+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1324+
SWIFT_VERSION = 4.0;
13091325
TARGETED_DEVICE_FAMILY = "1,2";
13101326
VALIDATE_PRODUCT = YES;
13111327
};
@@ -1336,7 +1352,8 @@
13361352
SDKROOT = iphoneos;
13371353
SWIFT_INSTALL_OBJC_HEADER = NO;
13381354
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1339-
SWIFT_VERSION = 3.0;
1355+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1356+
SWIFT_VERSION = 4.0;
13401357
};
13411358
name = Debug;
13421359
};
@@ -1360,7 +1377,8 @@
13601377
PRODUCT_NAME = "$(TARGET_NAME)";
13611378
SDKROOT = iphoneos;
13621379
SWIFT_INSTALL_OBJC_HEADER = NO;
1363-
SWIFT_VERSION = 3.0;
1380+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1381+
SWIFT_VERSION = 4.0;
13641382
VALIDATE_PRODUCT = YES;
13651383
};
13661384
name = Release;

Concurrent.xcodeproj/xcshareddata/xcschemes/Concurrent-iOS.xcscheme

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -40,7 +40,6 @@
4040
buildConfiguration = "Debug"
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43-
language = ""
4443
shouldUseLaunchSchemeArgsEnv = "YES">
4544
<Testables>
4645
<TestableReference
@@ -70,7 +69,6 @@
7069
buildConfiguration = "Debug"
7170
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
7271
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
73-
language = ""
7472
launchStyle = "0"
7573
useCustomWorkingDirectory = "NO"
7674
ignoresPersistentStateOnLaunch = "NO"

Concurrent.xcodeproj/xcshareddata/xcschemes/Concurrent-tvOS.xcscheme

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
<TestableReference
@@ -56,7 +55,6 @@
5655
buildConfiguration = "Debug"
5756
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5857
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6058
launchStyle = "0"
6159
useCustomWorkingDirectory = "NO"
6260
ignoresPersistentStateOnLaunch = "NO"

Concurrent.xcodeproj/xcshareddata/xcschemes/Concurrent-watchOS.xcscheme

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -37,7 +36,6 @@
3736
buildConfiguration = "Debug"
3837
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3938
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40-
language = ""
4139
launchStyle = "0"
4240
useCustomWorkingDirectory = "NO"
4341
ignoresPersistentStateOnLaunch = "NO"

Concurrent.xcodeproj/xcshareddata/xcschemes/Concurrent.xcscheme

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -40,7 +40,6 @@
4040
buildConfiguration = "Debug"
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43-
language = ""
4443
shouldUseLaunchSchemeArgsEnv = "YES">
4544
<Testables>
4645
<TestableReference
@@ -70,7 +69,6 @@
7069
buildConfiguration = "Debug"
7170
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
7271
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
73-
language = ""
7472
launchStyle = "0"
7573
useCustomWorkingDirectory = "NO"
7674
ignoresPersistentStateOnLaunch = "NO"

Sources/Concurrent/MVar.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ public final class MVar<A> {
204204
}
205205

206206
deinit {
207-
self.lock.deinitialize()
208-
self.takeCond.deinitialize()
209-
self.putCond.deinitialize()
207+
self.lock.deallocate()
208+
self.takeCond.deallocate()
209+
self.putCond.deallocate()
210210
}
211211
}
212212

Tests/ConcurrentTests/ChanSpec.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,25 @@ class ChanSpec : XCTestCase {
6363
}
6464

6565
// Based on the given number of items, produce an item-neutral sequence of fluff actions.
66-
private func actionsGen(_ emp : Int) -> Gen<ArrayOf<Action>> {
66+
private func actionsGen(_ emp : Int) -> Gen<[Action]> {
6767
var empty = emp
6868
if empty == 0 {
69-
return Gen.pure(ArrayOf([]))
69+
return Gen.pure([])
7070
}
7171

7272
var result = [Action]()
7373
while empty != 0 {
7474
empty -= 1
7575
let branch = randomInteger() % 3
7676
if branch == 0 {
77-
return Gen.pure(ArrayOf(Array(repeating: .readChan, count: empty) + result))
77+
return Gen.pure(Array(repeating: .readChan, count: empty) + result)
7878
} else if branch == 1 {
7979
result = [.isEmptyChan] + result + [.readChan]
8080
} else {
8181
result = [.writeChan(Int.arbitrary.generate)] + result + [.readChan]
8282
}
8383
}
84-
return Gen.pure(ArrayOf(result))
84+
return Gen.pure(result)
8585
}
8686

8787
private func perform(_ mv : Chan<Int>, _ ac : [Action]) -> ([Bool], [Int]) {
@@ -136,8 +136,8 @@ class ChanSpec : XCTestCase {
136136

137137
private func formulate(_ c : [Action], _ d : [Action]) -> Property {
138138
return forAll(actionsGen(delta(0, ac: c))) { suff in
139-
let (b1, l1) = self.setupPerformance(c + suff.getArray)
140-
let (b2, l2) = self.setupPerformance(d + suff.getArray)
139+
let (b1, l1) = self.setupPerformance(c + suff)
140+
let (b2, l2) = self.setupPerformance(d + suff)
141141
return
142142
((b1 == b2) <?> "Boolean Values Match")
143143
^&&^

0 commit comments

Comments
 (0)