Skip to content

Commit 0e51b22

Browse files
authored
Merge pull request Quick#689 from Quick/bump-swift-requirement
Bump Swift requirement to 5.0
2 parents 6abeb3f + 9962062 commit 0e51b22

File tree

12 files changed

+24
-89
lines changed

12 files changed

+24
-89
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: macOS-10.14
2727
strategy:
2828
matrix:
29-
xcode: [10.1, 10.3, 11]
29+
xcode: [10.3, 11]
3030
steps:
3131
- uses: actions/checkout@v1
3232
- run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app'
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: macOS-10.14
4040
strategy:
4141
matrix:
42-
xcode: [10.1, 10.3, 11]
42+
xcode: [10.3, 11]
4343
steps:
4444
- uses: actions/checkout@v1
4545
- run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app'

.swift-version

-1
This file was deleted.

.travis.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,20 @@ language: generic
66
matrix:
77
include:
88
- &swiftpm_linux
9-
name: SwiftPM / Linux / Swift 4.2.4
9+
name: SwiftPM / Linux / Swift 5.0.3
1010
os: linux
1111
dist: trusty
1212
sudo: required
1313
env:
14-
- SWIFT_VERSION=4.2.4
14+
- SWIFT_VERSION=5.0.3
1515
install:
1616
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
1717
script:
1818
- ./test swiftpm
19-
- <<: *swiftpm_linux
20-
name: SwiftPM / Linux / Swift 5.0.3
21-
env:
22-
- SWIFT_VERSION=5.0.3
2319
- <<: *swiftpm_linux
2420
name: SwiftPM / Linux / Swift 5.1 Development
2521
env:
26-
- SWIFT_VERSION=5.1-DEVELOPMENT-SNAPSHOT-2019-09-05-a
22+
- SWIFT_VERSION=5.1-DEVELOPMENT-SNAPSHOT-2019-09-09-a
2723
install: true
2824
script:
2925
- ./test $TYPE

Gemfile.lock

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
CFPropertyList (3.0.0)
4+
CFPropertyList (3.0.1)
55
activesupport (4.2.11.1)
66
i18n (~> 0.7)
77
minitest (~> 5.1)
88
thread_safe (~> 0.3, >= 0.3.4)
99
tzinfo (~> 1.1)
1010
atomos (0.1.3)
11-
claide (1.0.2)
12-
cocoapods (1.7.1)
11+
claide (1.0.3)
12+
cocoapods (1.7.5)
1313
activesupport (>= 4.0.2, < 5)
1414
claide (>= 1.0.2, < 2.0)
15-
cocoapods-core (= 1.7.1)
15+
cocoapods-core (= 1.7.5)
1616
cocoapods-deintegrate (>= 1.0.3, < 2.0)
1717
cocoapods-downloader (>= 1.2.2, < 2.0)
1818
cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -22,13 +22,13 @@ GEM
2222
cocoapods-try (>= 1.1.0, < 2.0)
2323
colored2 (~> 3.1)
2424
escape (~> 0.0.4)
25-
fourflusher (>= 2.2.0, < 3.0)
25+
fourflusher (>= 2.3.0, < 3.0)
2626
gh_inspector (~> 1.0)
2727
molinillo (~> 0.6.6)
2828
nap (~> 1.0)
2929
ruby-macho (~> 1.4)
30-
xcodeproj (>= 1.8.2, < 2.0)
31-
cocoapods-core (1.7.1)
30+
xcodeproj (>= 1.10.0, < 2.0)
31+
cocoapods-core (1.7.5)
3232
activesupport (>= 4.0.2, < 6)
3333
fuzzy_match (~> 2.0.4)
3434
nap (~> 1.0)
@@ -38,14 +38,14 @@ GEM
3838
nap
3939
cocoapods-search (1.0.0)
4040
cocoapods-stats (1.1.0)
41-
cocoapods-trunk (1.3.1)
41+
cocoapods-trunk (1.4.0)
4242
nap (>= 0.8, < 2.0)
4343
netrc (~> 0.11)
4444
cocoapods-try (1.1.0)
4545
colored2 (3.1.2)
4646
concurrent-ruby (1.1.5)
4747
escape (0.0.4)
48-
fourflusher (2.3.0)
48+
fourflusher (2.3.1)
4949
fuzzy_match (2.0.4)
5050
gh_inspector (1.1.3)
5151
i18n (0.9.5)
@@ -59,7 +59,7 @@ GEM
5959
thread_safe (0.3.6)
6060
tzinfo (1.2.5)
6161
thread_safe (~> 0.1)
62-
xcodeproj (1.9.0)
62+
xcodeproj (1.12.0)
6363
CFPropertyList (>= 2.3.3, < 4.0)
6464
atomos (~> 0.1.3)
6565
claide (>= 1.0.2, < 2.0)

Nimble.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Pod::Spec.new do |s|
5151

5252
s.cocoapods_version = '>= 1.4.0'
5353
if s.respond_to?(:swift_versions) then
54-
s.swift_versions = ['4.2', '5.0']
54+
s.swift_versions = ['5.0']
5555
else
56-
s.swift_version = '4.2'
56+
s.swift_version = '5.0'
5757
end
5858
end

Nimble.xcodeproj/project.pbxproj

+2-10
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@
6262
1F1B5AD51963E13900CA8BF9 /* BeAKindOfTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1B5AD31963E13900CA8BF9 /* BeAKindOfTest.swift */; };
6363
1F299EAB19627B2D002641AF /* BeEmptyTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F299EAA19627B2D002641AF /* BeEmptyTest.swift */; };
6464
1F299EAC19627B2D002641AF /* BeEmptyTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F299EAA19627B2D002641AF /* BeEmptyTest.swift */; };
65-
1F43728A1A1B343800EB80F8 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD251968AB07008ED995 /* Functional.swift */; };
66-
1F43728B1A1B343900EB80F8 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD251968AB07008ED995 /* Functional.swift */; };
6765
1F43728C1A1B343C00EB80F8 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD271968AB07008ED995 /* SourceLocation.swift */; };
6866
1F43728D1A1B343D00EB80F8 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD271968AB07008ED995 /* SourceLocation.swift */; };
6967
1F43728E1A1B343F00EB80F8 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD281968AB07008ED995 /* Stringers.swift */; };
@@ -142,7 +140,6 @@
142140
1F5DF1871BDCA0F500C3A531 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB4D5EC19FE43C200E9D9FE /* Match.swift */; };
143141
1F5DF1891BDCA0F500C3A531 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */; };
144142
1F5DF18A1BDCA0F500C3A531 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59651B551EE6002D767E /* ThrowError.swift */; };
145-
1F5DF18B1BDCA0F500C3A531 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD251968AB07008ED995 /* Functional.swift */; };
146143
1F5DF18C1BDCA0F500C3A531 /* Await.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD261968AB07008ED995 /* Await.swift */; };
147144
1F5DF18D1BDCA0F500C3A531 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD271968AB07008ED995 /* SourceLocation.swift */; };
148145
1F5DF18E1BDCA0F500C3A531 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD281968AB07008ED995 /* Stringers.swift */; };
@@ -588,7 +585,6 @@
588585
1FD8CD1C1968AB07008ED995 /* Equal.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Equal.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
589586
1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatcherProtocols.swift; sourceTree = "<group>"; };
590587
1FD8CD1E1968AB07008ED995 /* RaisesException.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = RaisesException.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
591-
1FD8CD251968AB07008ED995 /* Functional.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Functional.swift; sourceTree = "<group>"; };
592588
1FD8CD261968AB07008ED995 /* Await.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Await.swift; sourceTree = "<group>"; };
593589
1FD8CD271968AB07008ED995 /* SourceLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SourceLocation.swift; sourceTree = "<group>"; };
594590
1FD8CD281968AB07008ED995 /* Stringers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Stringers.swift; sourceTree = "<group>"; };
@@ -893,7 +889,6 @@
893889
1FD8CD241968AB07008ED995 /* Utils */ = {
894890
isa = PBXGroup;
895891
children = (
896-
1FD8CD251968AB07008ED995 /* Functional.swift */,
897892
1FD8CD261968AB07008ED995 /* Await.swift */,
898893
1FD8CD271968AB07008ED995 /* SourceLocation.swift */,
899894
1FD8CD281968AB07008ED995 /* Stringers.swift */,
@@ -1335,7 +1330,6 @@
13351330
1F43728D1A1B343D00EB80F8 /* SourceLocation.swift in Sources */,
13361331
1FD8CD4E1968AB07008ED995 /* BeLessThanOrEqual.swift in Sources */,
13371332
1FDBD8671AF8A4FF0089F27B /* AssertionDispatcher.swift in Sources */,
1338-
1F43728A1A1B343800EB80F8 /* Functional.swift in Sources */,
13391333
AE4BA9AD1C88DDB500B73906 /* Errors.swift in Sources */,
13401334
1FD8CD3C1968AB07008ED995 /* BeAnInstanceOf.swift in Sources */,
13411335
7A6AB2C51E7F628900A2F694 /* ToSucceed.swift in Sources */,
@@ -1523,7 +1517,6 @@
15231517
1F5DF1721BDCA0F500C3A531 /* Expectation.swift in Sources */,
15241518
7B5358C01C38479700A23FAA /* SatisfyAnyOf.swift in Sources */,
15251519
7B13BA0C1DD361D300C9098C /* ContainElementSatisfying.swift in Sources */,
1526-
1F5DF18B1BDCA0F500C3A531 /* Functional.swift in Sources */,
15271520
1F5DF1871BDCA0F500C3A531 /* Match.swift in Sources */,
15281521
);
15291522
runOnlyForDeploymentPostprocessing = 0;
@@ -1615,7 +1608,6 @@
16151608
1FD8CD4F1968AB07008ED995 /* BeLessThanOrEqual.swift in Sources */,
16161609
1F1871E71CA8A18400A34BF2 /* Async.swift in Sources */,
16171610
1FDBD8681AF8A4FF0089F27B /* AssertionDispatcher.swift in Sources */,
1618-
1F43728B1A1B343900EB80F8 /* Functional.swift in Sources */,
16191611
AE4BA9AE1C88DDB500B73906 /* Errors.swift in Sources */,
16201612
1FD8CD3D1968AB07008ED995 /* BeAnInstanceOf.swift in Sources */,
16211613
1FD8CD511968AB07008ED995 /* BeLogical.swift in Sources */,
@@ -1853,7 +1845,7 @@
18531845
SDKROOT = macosx;
18541846
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
18551847
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1856-
SWIFT_VERSION = 4.2;
1848+
SWIFT_VERSION = 5.0;
18571849
VERSIONING_SYSTEM = "apple-generic";
18581850
VERSION_INFO_PREFIX = "";
18591851
};
@@ -1910,7 +1902,7 @@
19101902
SDKROOT = macosx;
19111903
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
19121904
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
1913-
SWIFT_VERSION = 4.2;
1905+
SWIFT_VERSION = 5.0;
19141906
VALIDATE_PRODUCT = YES;
19151907
VERSIONING_SYSTEM = "apple-generic";
19161908
VERSION_INFO_PREFIX = "";

[email protected]

-30
This file was deleted.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1660,11 +1660,11 @@ backported.
16601660
The deprecating plan is a 3 major versions removal. Which is as follows:
16611661

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

16691669

16701670
# Installing Nimble

Sources/Nimble/Adapters/NimbleXCTestHandler.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class NimbleXCTestUnavailableHandler: AssertionHandler {
4545
private var stashed_swift_reportFatalErrorsToDebugger: Bool = false
4646

4747
@objc func testCaseWillStart(_ testCase: XCTestCase) {
48-
#if swift(>=3.2) && !os(tvOS)
48+
#if os(macOS) || os(iOS)
4949
stashed_swift_reportFatalErrorsToDebugger = _swift_reportFatalErrorsToDebugger
5050
_swift_reportFatalErrorsToDebugger = false
5151
#endif
@@ -56,7 +56,7 @@ class NimbleXCTestUnavailableHandler: AssertionHandler {
5656
@objc func testCaseDidFinish(_ testCase: XCTestCase) {
5757
currentTestCase = nil
5858

59-
#if swift(>=3.2) && !os(tvOS)
59+
#if os(macOS) || os(iOS)
6060
_swift_reportFatalErrorsToDebugger = stashed_swift_reportFatalErrorsToDebugger
6161
#endif
6262
}

Sources/Nimble/Utils/Await.swift

-4
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,7 @@ internal class AwaitPromiseBuilder<T> {
257257
self.trigger.timeoutSource.resume()
258258
while self.promise.asyncResult.isIncomplete() {
259259
// Stopping the run loop does not work unless we run only 1 mode
260-
#if (swift(>=4.2) && canImport(Darwin)) || compiler(>=5.0)
261260
_ = RunLoop.current.run(mode: .default, before: .distantFuture)
262-
#else
263-
_ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture)
264-
#endif
265261
}
266262

267263
self.trigger.timeoutSource.cancel()

Sources/Nimble/Utils/Functional.swift

-14
This file was deleted.

test

-4
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,8 @@ function test_podspec {
7878
echo "Gathering CocoaPods installation information..."
7979
run bundle exec pod --version
8080
echo "Linting podspec..."
81-
# To work around the lint error: "ERROR | swift: Specification `Nimble` specifies an inconsistent `swift_version` (`4.0`) compared to the one present in your `.swift-version` file (`4.1`). Please remove the `.swift-version` file which is now deprecated and only use the `swift_version` attribute within your podspec."
82-
# `.swift-version` is for swiftenv, not for CocoaPods, so we can't remove the file as suggested.
83-
run mv .swift-version .swift-version.backup
8481
# Note: remove `--allow-warnings` once old Matcher API has been removed
8582
run bundle exec pod lib lint Nimble.podspec --allow-warnings --skip-import-validation
86-
run mv .swift-version.backup .swift-version
8783
}
8884

8985
function test_swiftpm {

0 commit comments

Comments
 (0)