Skip to content

Commit

Permalink
Merge pull request #275 from CodaFi/touch-up
Browse files Browse the repository at this point in the history
Update to Swift 4.2
  • Loading branch information
CodaFi authored Sep 19, 2018
2 parents 2567216 + 79b306c commit cf99580
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 456 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1
4.2
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ matrix:
include:
- os: osx
language: objective-c
osx_image: xcode9.3
osx_image: xcode10
before_install:
- git submodule update --init --recursive
- pushd Utilities
- ./compile.sh
- popd
script:
- pod lib lint
# FIXME: Re-enable when pods 1.6.0 is out of beta
# - pod lib lint
- carthage build --no-skip-current
- os: osx
language: objective-c
osx_image: xcode9.3
osx_image: xcode10
before_install:
- git submodule update --init --recursive
- pushd Utilities
Expand All @@ -36,9 +37,9 @@ matrix:
before_install:
- git submodule update --init --recursive
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
- wget https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-4.1-RELEASE-ubuntu14.04.tar.gz
- export PATH=${PWD}/swift-4.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- wget https://swift.org/builds/swift-4.2-release/ubuntu1404/swift-4.2-RELEASE/swift-4.2-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-4.2-RELEASE-ubuntu14.04.tar.gz
- export PATH=${PWD}/swift-4.2-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- pushd Utilities
- ./compile.sh
- popd
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "trill-lang/FileCheck" "0.0.4"
github "trill-lang/FileCheck" "0.0.8"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/FileCheck
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.1
// swift-tools-version:4.2

import PackageDescription

Expand Down
410 changes: 0 additions & 410 deletions Sources/SwiftCheck/Cartesian.swift

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions Sources/SwiftCheck/Check.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,6 @@ public func <- (checker : ReportiveQuickCheck, test : @autoclosure @escaping ()
_ = quickCheckWithResult(checker.args, test())
}

/// Tests a property and prints the results to stdout.
///
/// - parameter prop: The property to be tested.
/// - parameter name: The name of the property being tested.
@available(*, deprecated, message: "Use quickCheck(asserting:) or quickCheck(reporting:) instead.")
public func quickCheck(_ prop : Testable, name : String = "") {
_ = quickCheckWithResult(CheckerArguments(name: name), prop)
}

/// The interface for properties to be run through SwiftCheck with an XCTest
/// assert. The property will still generate console output during testing.
///
Expand Down
4 changes: 0 additions & 4 deletions Sources/SwiftCheck/Gen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ extension Gen {
}
}

@available(*, deprecated, renamed: "zipWith")
public static func map<A1, A2>(_ ga1 : Gen<A1>, _ ga2 : Gen<A2>, transform: @escaping (A1, A2) -> A) -> Gen {
return Gen.zipWith(ga1, ga2, transform: transform)
}
/// Returns a new generator that applies a given function to any outputs the
/// given generators produce.
public static func zipWith<A1, A2>(_ ga1 : Gen<A1>, _ ga2 : Gen<A2>, transform: @escaping (A1, A2) -> A) -> Gen {
Expand Down
24 changes: 12 additions & 12 deletions SwiftCheck.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OBJC_INTERFACE_HEADER_NAME = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
Expand Down Expand Up @@ -880,7 +880,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
Expand All @@ -903,7 +903,7 @@
SDKROOT = appletvos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
Expand All @@ -923,7 +923,7 @@
SDKROOT = appletvos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -1062,7 +1062,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand Down Expand Up @@ -1095,7 +1095,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -1120,7 +1120,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -1142,7 +1142,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down Expand Up @@ -1178,7 +1178,7 @@
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OBJC_INTERFACE_HEADER_NAME = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2,3";
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
Expand Down Expand Up @@ -1212,7 +1212,7 @@
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2,3";
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
Expand Down Expand Up @@ -1243,7 +1243,7 @@
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -1266,7 +1266,7 @@
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down
11 changes: 0 additions & 11 deletions Templates/Cartesian.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ zip_with_argument_list = ', '.join(['ga{0}'.format(n) for n in range(1, arity +
}
}

/// Returns a new generator that applies a given function to any outputs the
/// given generators produce.
///
% for (t, p) in zip(types_list, ['ga{0}'.format(n) for n in range(1, arity + 1)]):
/// - parameter ${p}: A generator of values of type `${t}`.
% end
@available(*, deprecated, renamed: "zipWith")
public static func map<${type_parameter_list}>(${parameter_list}, transform : @escaping (${type_parameter_list}) -> A) -> Gen<A> {
return Gen<A>.zipWith(${zip_with_argument_list}, transform: transform)
}

/// Returns a new generator that applies a given function to any outputs the
/// given generators produce.
///
Expand Down

0 comments on commit cf99580

Please sign in to comment.