Skip to content

Commit b6b4bc6

Browse files
committed
Try an update to Xcode 9.3
1 parent c489d88 commit b6b4bc6

File tree

14 files changed

+46
-43
lines changed

14 files changed

+46
-43
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0
1+
4.1

.travis.yml

Lines changed: 9 additions & 18 deletions
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
- pushd Utilities
@@ -16,7 +16,7 @@ matrix:
1616
- carthage build --no-skip-current
1717
- os: osx
1818
language: objective-c
19-
osx_image: xcode9
19+
osx_image: xcode9.3
2020
before_install:
2121
- git submodule update --init --recursive
2222
- pushd Utilities
@@ -25,29 +25,20 @@ matrix:
2525
script:
2626
- set -o pipefail
2727
- xcodebuild test -scheme SwiftCheck | xcpretty -c
28-
# -- Start iOS --
29-
# !!!: Make sure desired device name & OS version are suitable for the Xcode version installed on osx_image
30-
- iOS_DEVICE_NAME="iPad Pro (12.9-inch) (2nd generation)"
31-
- iOS_RUNTIME_VERSION="11.0"
32-
# Get simulator identifier for desired device/runtime pair
33-
- SIMULATOR_ID=$(xcrun instruments -s | grep -o "${iOS_DEVICE_NAME} (${iOS_RUNTIME_VERSION}) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/")
34-
- echo $SIMULATOR_ID
35-
- echo $iOS_DEVICE_NAME
36-
- echo $iOS_RUNTIME_VERSION
37-
- xcodebuild build-for-testing -scheme SwiftCheck-iOS -destination "platform=iOS Simulator,name=${iOS_DEVICE_NAME},OS=${iOS_RUNTIME_VERSION}" | xcpretty -c
38-
- xcodebuild test -scheme SwiftCheck-iOS -destination "platform=iOS Simulator,name=${iOS_DEVICE_NAME},OS=${iOS_RUNTIME_VERSION}" | xcpretty -c
39-
- xcodebuild build-for-testing -scheme SwiftCheck-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 1080p' | xcpretty -c
40-
- xcodebuild test -scheme SwiftCheck-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 1080p' | xcpretty -c
28+
- xcodebuild build-for-testing -scheme SwiftCheck-iOS -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (2nd generation)" | xcpretty -c
29+
- xcodebuild test -scheme SwiftCheck-iOS -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (2nd generation)" | xcpretty -c
30+
- xcodebuild build-for-testing -scheme SwiftCheck-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p)' | xcpretty -c
31+
- xcodebuild test -scheme SwiftCheck-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p)' | xcpretty -c
4132
- os: linux
4233
language: generic
4334
sudo: required
4435
dist: trusty
4536
before_install:
4637
- git submodule update --init --recursive
4738
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
48-
- wget https://swift.org/builds/development/ubuntu1404/swift-DEVELOPMENT-SNAPSHOT-2017-11-16-a/swift-DEVELOPMENT-SNAPSHOT-2017-11-16-a-ubuntu14.04.tar.gz
49-
- tar xzf swift-DEVELOPMENT-SNAPSHOT-2017-11-16-a-ubuntu14.04.tar.gz
50-
- export PATH=${PWD}/swift-DEVELOPMENT-SNAPSHOT-2017-11-16-a-ubuntu14.04/usr/bin:"${PATH}"
39+
- wget https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz
40+
- tar xzf swift-4.1-RELEASE-ubuntu14.04.tar.gz
41+
- export PATH=${PWD}/swift-4.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
5142
- pushd Utilities
5243
- ./compile.sh
5344
- popd

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.0
1+
// swift-tools-version:4.1
22

33
import PackageDescription
44

Sources/SwiftCheck/Modifiers.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,8 @@ private final class PointerOfImpl<T : Arbitrary> : Arbitrary {
496496
}
497497

498498
deinit {
499-
if self.size > 0 && self.ptr != nil {
500-
self.ptr?.deallocate(capacity: self.size)
501-
self.ptr = nil
502-
}
499+
self.ptr?.deallocate()
500+
self.ptr = nil
503501
}
504502

505503
static var arbitrary : Gen<PointerOfImpl<T>> {

SwiftCheck.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@
532532
isa = PBXProject;
533533
attributes = {
534534
LastSwiftUpdateCheck = 0730;
535-
LastUpgradeCheck = 0900;
535+
LastUpgradeCheck = 0930;
536536
ORGANIZATIONNAME = Typelift;
537537
TargetAttributes = {
538538
8240CCB01C3A123600EF4D29 = {
@@ -941,12 +941,14 @@
941941
CLANG_WARN_BOOL_CONVERSION = YES;
942942
CLANG_WARN_COMMA = YES;
943943
CLANG_WARN_CONSTANT_CONVERSION = YES;
944+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
944945
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
945946
CLANG_WARN_EMPTY_BODY = YES;
946947
CLANG_WARN_ENUM_CONVERSION = YES;
947948
CLANG_WARN_INFINITE_RECURSION = YES;
948949
CLANG_WARN_INT_CONVERSION = YES;
949950
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
951+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
950952
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
951953
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
952954
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -995,12 +997,14 @@
995997
CLANG_WARN_BOOL_CONVERSION = YES;
996998
CLANG_WARN_COMMA = YES;
997999
CLANG_WARN_CONSTANT_CONVERSION = YES;
1000+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
9981001
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
9991002
CLANG_WARN_EMPTY_BODY = YES;
10001003
CLANG_WARN_ENUM_CONVERSION = YES;
10011004
CLANG_WARN_INFINITE_RECURSION = YES;
10021005
CLANG_WARN_INT_CONVERSION = YES;
10031006
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1007+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
10041008
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
10051009
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
10061010
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

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

Lines changed: 1 addition & 3 deletions
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"

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

Lines changed: 1 addition & 3 deletions
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"

SwiftCheck.xcodeproj/xcshareddata/xcschemes/SwiftCheck.xcscheme

Lines changed: 1 addition & 3 deletions
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"

Tests/SwiftCheckTests/FormatterSpec.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct Formatter<Value> {
2727

2828
func format(_ value : Value) -> String {
2929
let formatted = makeString(value)
30-
let maxIndex = formatted.index(formatted.startIndex, offsetBy: String.IndexDistance(lengthLimit))
30+
let maxIndex = formatted.index(formatted.startIndex, offsetBy: Int(lengthLimit))
3131
if maxIndex >= formatted.endIndex {
3232
return formatted
3333
} else {
@@ -76,7 +76,7 @@ class FormatterSpec : XCTestCase {
7676
let formatter = af.get
7777
let string = formatter.format(x)
7878
_ = formatter.unFormat(string)
79-
return string.distance(from: string.startIndex, to: string.endIndex) <= String.IndexDistance(formatter.lengthLimit)
79+
return string.distance(from: string.startIndex, to: string.endIndex) <= Int(formatter.lengthLimit)
8080
}
8181

8282
})

0 commit comments

Comments
 (0)