Skip to content

Commit

Permalink
Bump Swift requirement to 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesyo committed Sep 11, 2019
1 parent 6abeb3f commit 22585d5
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 75 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: macOS-10.14
strategy:
matrix:
xcode: [10.1, 10.3, 11]
xcode: [10.3, 11]
steps:
- uses: actions/checkout@v1
- run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app'
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: macOS-10.14
strategy:
matrix:
xcode: [10.1, 10.3, 11]
xcode: [10.3, 11]
steps:
- uses: actions/checkout@v1
- run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app'
Expand Down
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,20 @@ language: generic
matrix:
include:
- &swiftpm_linux
name: SwiftPM / Linux / Swift 4.2.4
name: SwiftPM / Linux / Swift 5.0.3
os: linux
dist: trusty
sudo: required
env:
- SWIFT_VERSION=4.2.4
- SWIFT_VERSION=5.0.3
install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
script:
- ./test swiftpm
- <<: *swiftpm_linux
name: SwiftPM / Linux / Swift 5.0.3
env:
- SWIFT_VERSION=5.0.3
- <<: *swiftpm_linux
name: SwiftPM / Linux / Swift 5.1 Development
env:
- SWIFT_VERSION=5.1-DEVELOPMENT-SNAPSHOT-2019-09-05-a
- SWIFT_VERSION=5.1-DEVELOPMENT-SNAPSHOT-2019-09-09-a
install: true
script:
- ./test $TYPE
Expand Down
4 changes: 2 additions & 2 deletions Nimble.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Pod::Spec.new do |s|

s.cocoapods_version = '>= 1.4.0'
if s.respond_to?(:swift_versions) then
s.swift_versions = ['4.2', '5.0']
s.swift_versions = ['5.0']
else
s.swift_version = '4.2'
s.swift_version = '5.0'
end
end
12 changes: 2 additions & 10 deletions Nimble.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
1F1B5AD51963E13900CA8BF9 /* BeAKindOfTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1B5AD31963E13900CA8BF9 /* BeAKindOfTest.swift */; };
1F299EAB19627B2D002641AF /* BeEmptyTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F299EAA19627B2D002641AF /* BeEmptyTest.swift */; };
1F299EAC19627B2D002641AF /* BeEmptyTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F299EAA19627B2D002641AF /* BeEmptyTest.swift */; };
1F43728A1A1B343800EB80F8 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD251968AB07008ED995 /* Functional.swift */; };
1F43728B1A1B343900EB80F8 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD251968AB07008ED995 /* Functional.swift */; };
1F43728C1A1B343C00EB80F8 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD271968AB07008ED995 /* SourceLocation.swift */; };
1F43728D1A1B343D00EB80F8 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD271968AB07008ED995 /* SourceLocation.swift */; };
1F43728E1A1B343F00EB80F8 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD281968AB07008ED995 /* Stringers.swift */; };
Expand Down Expand Up @@ -142,7 +140,6 @@
1F5DF1871BDCA0F500C3A531 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB4D5EC19FE43C200E9D9FE /* Match.swift */; };
1F5DF1891BDCA0F500C3A531 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */; };
1F5DF18A1BDCA0F500C3A531 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59651B551EE6002D767E /* ThrowError.swift */; };
1F5DF18B1BDCA0F500C3A531 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD251968AB07008ED995 /* Functional.swift */; };
1F5DF18C1BDCA0F500C3A531 /* Await.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD261968AB07008ED995 /* Await.swift */; };
1F5DF18D1BDCA0F500C3A531 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD271968AB07008ED995 /* SourceLocation.swift */; };
1F5DF18E1BDCA0F500C3A531 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD281968AB07008ED995 /* Stringers.swift */; };
Expand Down Expand Up @@ -588,7 +585,6 @@
1FD8CD1C1968AB07008ED995 /* Equal.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Equal.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatcherProtocols.swift; sourceTree = "<group>"; };
1FD8CD1E1968AB07008ED995 /* RaisesException.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = RaisesException.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
1FD8CD251968AB07008ED995 /* Functional.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Functional.swift; sourceTree = "<group>"; };
1FD8CD261968AB07008ED995 /* Await.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Await.swift; sourceTree = "<group>"; };
1FD8CD271968AB07008ED995 /* SourceLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SourceLocation.swift; sourceTree = "<group>"; };
1FD8CD281968AB07008ED995 /* Stringers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Stringers.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -893,7 +889,6 @@
1FD8CD241968AB07008ED995 /* Utils */ = {
isa = PBXGroup;
children = (
1FD8CD251968AB07008ED995 /* Functional.swift */,
1FD8CD261968AB07008ED995 /* Await.swift */,
1FD8CD271968AB07008ED995 /* SourceLocation.swift */,
1FD8CD281968AB07008ED995 /* Stringers.swift */,
Expand Down Expand Up @@ -1335,7 +1330,6 @@
1F43728D1A1B343D00EB80F8 /* SourceLocation.swift in Sources */,
1FD8CD4E1968AB07008ED995 /* BeLessThanOrEqual.swift in Sources */,
1FDBD8671AF8A4FF0089F27B /* AssertionDispatcher.swift in Sources */,
1F43728A1A1B343800EB80F8 /* Functional.swift in Sources */,
AE4BA9AD1C88DDB500B73906 /* Errors.swift in Sources */,
1FD8CD3C1968AB07008ED995 /* BeAnInstanceOf.swift in Sources */,
7A6AB2C51E7F628900A2F694 /* ToSucceed.swift in Sources */,
Expand Down Expand Up @@ -1523,7 +1517,6 @@
1F5DF1721BDCA0F500C3A531 /* Expectation.swift in Sources */,
7B5358C01C38479700A23FAA /* SatisfyAnyOf.swift in Sources */,
7B13BA0C1DD361D300C9098C /* ContainElementSatisfying.swift in Sources */,
1F5DF18B1BDCA0F500C3A531 /* Functional.swift in Sources */,
1F5DF1871BDCA0F500C3A531 /* Match.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1615,7 +1608,6 @@
1FD8CD4F1968AB07008ED995 /* BeLessThanOrEqual.swift in Sources */,
1F1871E71CA8A18400A34BF2 /* Async.swift in Sources */,
1FDBD8681AF8A4FF0089F27B /* AssertionDispatcher.swift in Sources */,
1F43728B1A1B343900EB80F8 /* Functional.swift in Sources */,
AE4BA9AE1C88DDB500B73906 /* Errors.swift in Sources */,
1FD8CD3D1968AB07008ED995 /* BeAnInstanceOf.swift in Sources */,
1FD8CD511968AB07008ED995 /* BeLogical.swift in Sources */,
Expand Down Expand Up @@ -1853,7 +1845,7 @@
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down Expand Up @@ -1910,7 +1902,7 @@
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down
30 changes: 0 additions & 30 deletions Package@swift-4.2.swift

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1660,11 +1660,11 @@ backported.
The deprecating plan is a 3 major versions removal. Which is as follows:

1. Introduce new `Predicate` API, deprecation warning for old matcher APIs.
(Nimble `v7.x.x` and `v8.x.x`)
(Nimble `v7.x.x`, `v8.x.x` and `v9.x.x`)
2. Introduce warnings on migration-path features (`.predicate`,
`Predicate`-constructors with similar arguments to old API). (Nimble
`v9.x.x`)
3. Remove old API. (Nimble `v10.x.x`)
`v10.x.x`)
3. Remove old API. (Nimble `v11.x.x`)


# Installing Nimble
Expand Down
4 changes: 2 additions & 2 deletions Sources/Nimble/Adapters/NimbleXCTestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class NimbleXCTestUnavailableHandler: AssertionHandler {
private var stashed_swift_reportFatalErrorsToDebugger: Bool = false

@objc func testCaseWillStart(_ testCase: XCTestCase) {
#if swift(>=3.2) && !os(tvOS)
#if os(macOS) || os(iOS)
stashed_swift_reportFatalErrorsToDebugger = _swift_reportFatalErrorsToDebugger
_swift_reportFatalErrorsToDebugger = false
#endif
Expand All @@ -56,7 +56,7 @@ class NimbleXCTestUnavailableHandler: AssertionHandler {
@objc func testCaseDidFinish(_ testCase: XCTestCase) {
currentTestCase = nil

#if swift(>=3.2) && !os(tvOS)
#if os(macOS) || os(iOS)
_swift_reportFatalErrorsToDebugger = stashed_swift_reportFatalErrorsToDebugger
#endif
}
Expand Down
4 changes: 0 additions & 4 deletions Sources/Nimble/Utils/Await.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,7 @@ internal class AwaitPromiseBuilder<T> {
self.trigger.timeoutSource.resume()
while self.promise.asyncResult.isIncomplete() {
// Stopping the run loop does not work unless we run only 1 mode
#if (swift(>=4.2) && canImport(Darwin)) || compiler(>=5.0)
_ = RunLoop.current.run(mode: .default, before: .distantFuture)
#else
_ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture)
#endif
}

self.trigger.timeoutSource.cancel()
Expand Down
14 changes: 0 additions & 14 deletions Sources/Nimble/Utils/Functional.swift

This file was deleted.

0 comments on commit 22585d5

Please sign in to comment.