Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Swift requirement to 5.0 #689

Merged
merged 1 commit into from
Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
CFPropertyList (3.0.1)
activesupport (4.2.11.1)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
atomos (0.1.3)
claide (1.0.2)
cocoapods (1.7.1)
claide (1.0.3)
cocoapods (1.7.5)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.7.1)
cocoapods-core (= 1.7.5)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -22,13 +22,13 @@ GEM
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.2.0, < 3.0)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.8.2, < 2.0)
cocoapods-core (1.7.1)
xcodeproj (>= 1.10.0, < 2.0)
cocoapods-core (1.7.5)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
Expand All @@ -38,14 +38,14 @@ GEM
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.3.1)
cocoapods-trunk (1.4.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored2 (3.1.2)
concurrent-ruby (1.1.5)
escape (0.0.4)
fourflusher (2.3.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
i18n (0.9.5)
Expand All @@ -59,7 +59,7 @@ GEM
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcodeproj (1.9.0)
xcodeproj (1.12.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
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.

4 changes: 0 additions & 4 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,8 @@ function test_podspec {
echo "Gathering CocoaPods installation information..."
run bundle exec pod --version
echo "Linting podspec..."
# 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."
# `.swift-version` is for swiftenv, not for CocoaPods, so we can't remove the file as suggested.
run mv .swift-version .swift-version.backup
# Note: remove `--allow-warnings` once old Matcher API has been removed
run bundle exec pod lib lint Nimble.podspec --allow-warnings --skip-import-validation
run mv .swift-version.backup .swift-version
}

function test_swiftpm {
Expand Down