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

Swift 3 Support #62

Merged
merged 27 commits into from
Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
20790c6
Gets ReactiveCocoa to compile with Swift 3 in Xcode 8.
mattprowse Jun 26, 2016
79ae0d4
Renamed TaskError.POSIXError to TaskError.posixError.
mattprowse Jun 27, 2016
95fd23a
Fix typo in NSPOSIXErrorDomain.
mattprowse Jun 27, 2016
0f70cce
Add `let _ =` to get rid of unused result warnings.
mattprowse Jun 28, 2016
6efac00
Minor refactoring.
mattprowse Jun 28, 2016
0a7cf6d
Updated test spec for Swift 3.
mattprowse Jun 28, 2016
004a0db
Update ReactiveCocoa.
mattprowse Jun 28, 2016
a654733
Clean up extraneous spaces at the beginning of functions caused by th…
mattprowse Jun 30, 2016
b474051
Merge upstream changes.
mattprowse Jul 4, 2016
2d51316
Track new ReactiveCocoa Swift 3 development branch.
mattprowse Jul 4, 2016
9357c96
The "should launch a task with standard input" test now passes.
mattprowse Jul 5, 2016
e81cd5c
Make Travis CI use Xcode 8.
mattprowse Jul 5, 2016
c341ba9
Updated ReactiveCocoa.
mattprowse Jul 12, 2016
403ba55
Merge upstream changes.
mattprowse Jul 12, 2016
54672bc
Xcode 8 beta 3 changes.
mattprowse Jul 19, 2016
dedbeaf
Merge upstream changes.
mattprowse Aug 2, 2016
24d89a3
Xcode 8 beta 4 changes.
mattprowse Aug 4, 2016
585cbdd
Tracking ReactiveCocoa changes.
mattprowse Aug 5, 2016
e15a1c4
Update dependencies.
mattprowse Aug 8, 2016
e373dae
Set deployment target back to 10.9.
mattprowse Aug 8, 2016
d31b40b
Update ReactiveCocoa.
mattprowse Aug 12, 2016
6c103aa
Changes for Xcode 8 beta 6 compatibility.
mattprowse Aug 18, 2016
1938e96
Update dependencies.
mattprowse Aug 23, 2016
1d27a95
Replace use of DispatchData(bytesNoCopy:deallocator:) with DispatchDa…
mattprowse Aug 23, 2016
5643f8c
Update dependencies for Xcode 8 GM compatibility.
mattprowse Sep 8, 2016
a044039
Update documentation for Swift 3.
mattprowse Sep 8, 2016
e597cb6
Remove commented out code.
mattprowse Sep 12, 2016
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
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "Carthage/Checkouts/Nimble"]
path = Carthage/Checkouts/Nimble
url = https://github.com/Quick/Nimble.git
url = https://github.com/andersio/Nimble.git
[submodule "Carthage/Checkouts/Quick"]
path = Carthage/Checkouts/Quick
url = https://github.com/Quick/Quick.git
url = https://github.com/norio-nomura/Quick.git
[submodule "Carthage/Checkouts/Result"]
path = Carthage/Checkouts/Result
url = https://github.com/antitypical/Result.git
url = https://github.com/jameshurst/Result.git
[submodule "Carthage/Checkouts/xcconfigs"]
path = Carthage/Checkouts/xcconfigs
url = https://github.com/jspahrsummers/xcconfigs.git
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ deploy:
on:
repo: Carthage/ReactiveTask
tags: true
condition: $JOB = Xcode7.3
condition: $JOB = Xcode8
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveCocoa/ReactiveCocoa" ~> 4.2.2
github "ReactiveCocoa/ReactiveCocoa" "RAC5"
4 changes: 2 additions & 2 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Quick/Quick" ~> 0.9.3
github "Quick/Nimble" "188caeb"
github "norio-nomura/Quick" "nn-swift-3-compatibility"
github "andersio/Nimble" "swift3-beta-4"
github "jspahrsummers/xcconfigs" "1ef9763"
8 changes: 4 additions & 4 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github "Quick/Nimble" "188caeb094bc342614d8a5c706cd8bb9a6c355eb"
github "Quick/Quick" "v0.9.3"
github "antitypical/Result" "2.1.3"
github "andersio/Nimble" "7c0762319cd5c902a85b92722a0659cc33cd6338"
github "norio-nomura/Quick" "eaf60d980d88ffefd8c3a7515f53547453d5938b"
github "jameshurst/Result" "2401fa7584183da17f40335816073bf511fb34b8"
github "jspahrsummers/xcconfigs" "1ef97639ffbe041da0b1392b2114fa19b922a7a1"
github "ReactiveCocoa/ReactiveCocoa" "v4.2.2"
github "ReactiveCocoa/ReactiveCocoa" "b4d757433574f85519bb3253a631955da937106a"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Nimble
Submodule Nimble updated 97 files
+1 −1 .swift-version
+8 −16 .travis.yml
+28 −24 Gemfile.lock
+5 −5 Nimble.podspec
+56 −20 Nimble.xcodeproj/project.pbxproj
+1 −1 Nimble.xcodeproj/xcshareddata/xcschemes/Nimble-OSX.xcscheme
+1 −1 Nimble.xcodeproj/xcshareddata/xcschemes/Nimble-iOS.xcscheme
+1 −1 Nimble.xcodeproj/xcshareddata/xcschemes/Nimble-tvOS.xcscheme
+4 −1 Package.swift
+17 −17 README.md
+1 −1 Sources/Nimble/Adapters/AdapterProtocols.swift
+1 −1 Sources/Nimble/Adapters/AssertionDispatcher.swift
+4 −4 Sources/Nimble/Adapters/AssertionRecorder.swift
+5 −5 Sources/Nimble/Adapters/NMBExpectation.swift
+3 −3 Sources/Nimble/Adapters/NMBObjCMatcher.swift
+19 −4 Sources/Nimble/Adapters/NimbleEnvironment.swift
+8 −8 Sources/Nimble/Adapters/NimbleXCTestHandler.swift
+2 −2 Sources/Nimble/Adapters/NonObjectiveC/ExceptionCapture.swift
+0 −11 Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h
+20 −20 Sources/Nimble/DSL+Wait.swift
+13 −13 Sources/Nimble/DSL.swift
+6 −6 Sources/Nimble/Expectation.swift
+2 −2 Sources/Nimble/Expression.swift
+9 −5 Sources/Nimble/FailureMessage.swift
+43 −0 Sources/Nimble/LinuxSupport.swift
+10 −10 Sources/Nimble/Matchers/AllPass.swift
+24 −24 Sources/Nimble/Matchers/AsyncMatcherWrapper.swift
+4 −4 Sources/Nimble/Matchers/BeAKindOf.swift
+4 −4 Sources/Nimble/Matchers/BeAnInstanceOf.swift
+8 −11 Sources/Nimble/Matchers/BeCloseTo.swift
+3 −3 Sources/Nimble/Matchers/BeEmpty.swift
+4 −4 Sources/Nimble/Matchers/BeGreaterThan.swift
+4 −4 Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift
+3 −3 Sources/Nimble/Matchers/BeIdenticalTo.swift
+4 −4 Sources/Nimble/Matchers/BeLessThan.swift
+4 −4 Sources/Nimble/Matchers/BeLessThanOrEqual.swift
+16 −5 Sources/Nimble/Matchers/BeLogical.swift
+11 −7 Sources/Nimble/Matchers/BeginWith.swift
+15 −11 Sources/Nimble/Matchers/Contain.swift
+11 −7 Sources/Nimble/Matchers/EndWith.swift
+13 −13 Sources/Nimble/Matchers/Equal.swift
+5 −5 Sources/Nimble/Matchers/HaveCount.swift
+3 −3 Sources/Nimble/Matchers/Match.swift
+4 −4 Sources/Nimble/Matchers/MatchError.swift
+5 −5 Sources/Nimble/Matchers/MatcherFunc.swift
+30 −28 Sources/Nimble/Matchers/MatcherProtocols.swift
+16 −10 Sources/Nimble/Matchers/PostNotification.swift
+10 −9 Sources/Nimble/Matchers/RaisesException.swift
+5 −5 Sources/Nimble/Matchers/SatisfyAnyOf.swift
+8 −8 Sources/Nimble/Matchers/ThrowError.swift
+66 −74 Sources/Nimble/Utils/Async.swift
+15 −15 Sources/Nimble/Utils/Errors.swift
+2 −2 Sources/Nimble/Utils/Functional.swift
+32 −34 Sources/Nimble/Utils/Stringers.swift
+0 −0 Sources/NimbleObjectiveC/CurrentTestCaseTracker.h
+0 −0 Sources/NimbleObjectiveC/DSL.h
+0 −0 Sources/NimbleObjectiveC/DSL.m
+11 −0 Sources/NimbleObjectiveC/NMBExceptionCapture.h
+4 −4 Sources/NimbleObjectiveC/NMBExceptionCapture.m
+0 −0 Sources/NimbleObjectiveC/NMBStringify.h
+0 −0 Sources/NimbleObjectiveC/NMBStringify.m
+0 −0 Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m
+29 −29 Tests/LinuxMain.swift
+15 −15 Tests/Nimble/AsynchronousTest.swift
+31 −14 Tests/Nimble/Helpers/XCTestCaseProvider.swift
+27 −14 Tests/Nimble/Helpers/utils.swift
+60 −0 Tests/Nimble/LinuxSupport.swift
+2 −2 Tests/Nimble/Matchers/AllPassTest.swift
+13 −13 Tests/Nimble/Matchers/BeAKindOfTest.swift
+12 −12 Tests/Nimble/Matchers/BeAnInstanceOfTest.swift
+32 −40 Tests/Nimble/Matchers/BeCloseToTest.swift
+4 −4 Tests/Nimble/Matchers/BeEmptyTest.swift
+7 −7 Tests/Nimble/Matchers/BeGreaterThanOrEqualToTest.swift
+6 −6 Tests/Nimble/Matchers/BeGreaterThanTest.swift
+6 −6 Tests/Nimble/Matchers/BeIdenticalToObjectTest.swift
+9 −9 Tests/Nimble/Matchers/BeIdenticalToTest.swift
+6 −6 Tests/Nimble/Matchers/BeLessThanOrEqualToTest.swift
+7 −7 Tests/Nimble/Matchers/BeLessThanTest.swift
+27 −18 Tests/Nimble/Matchers/BeLogicalTest.swift
+2 −2 Tests/Nimble/Matchers/BeNilTest.swift
+2 −2 Tests/Nimble/Matchers/BeVoidTest.swift
+2 −2 Tests/Nimble/Matchers/BeginWithTest.swift
+2 −2 Tests/Nimble/Matchers/ContainTest.swift
+2 −2 Tests/Nimble/Matchers/EndWithTest.swift
+13 −13 Tests/Nimble/Matchers/EqualTest.swift
+2 −2 Tests/Nimble/Matchers/HaveCountTest.swift
+19 −19 Tests/Nimble/Matchers/MatchErrorTest.swift
+2 −2 Tests/Nimble/Matchers/MatchTest.swift
+21 −37 Tests/Nimble/Matchers/PostNotificationTest.swift
+37 −37 Tests/Nimble/Matchers/RaisesExceptionTest.swift
+2 −2 Tests/Nimble/Matchers/SatisfyAnyOfTest.swift
+45 −45 Tests/Nimble/Matchers/ThrowErrorTest.swift
+8 −8 Tests/Nimble/SynchronousTests.swift
+2 −2 Tests/Nimble/UserDescriptionTest.swift
+2 −2 Tests/Nimble/objc/ObjCHaveCount.m
+8 −8 Tests/Nimble/objc/ObjCRaiseExceptionTest.m
+4 −1 test
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Quick
Submodule Quick updated from faa605 to eaf60d
2 changes: 1 addition & 1 deletion Carthage/Checkouts/ReactiveCocoa
Submodule ReactiveCocoa updated 65 files
+1 −0 .gitignore
+3 −3 .gitmodules
+2 −33 .travis.yml
+1 −1 Cartfile
+2 −2 Cartfile.private
+3 −3 Cartfile.resolved
+1 −1 Carthage/Checkouts/Nimble
+1 −1 Carthage/Checkouts/Quick
+1 −1 Carthage/Checkouts/Result
+192 −193 ReactiveCocoa.playground/Pages/Signal.xcplaygroundpage/Contents.swift
+664 −693 ReactiveCocoa.playground/Pages/SignalProducer.xcplaygroundpage/Contents.swift
+3 −3 ReactiveCocoa.playground/Sources/PlaygroundUtility.swift
+50 −23 ReactiveCocoa.xcodeproj/project.pbxproj
+1 −1 ReactiveCocoa.xcodeproj/xcshareddata/xcschemes/ReactiveCocoa-Mac.xcscheme
+1 −1 ReactiveCocoa.xcodeproj/xcshareddata/xcschemes/ReactiveCocoa-iOS.xcscheme
+1 −1 ReactiveCocoa.xcodeproj/xcshareddata/xcschemes/ReactiveCocoa-tvOS.xcscheme
+1 −1 ReactiveCocoa.xcodeproj/xcshareddata/xcschemes/ReactiveCocoa-watchOS.xcscheme
+7 −3 ReactiveCocoa/Objective-C/RACCommand.h
+0 −8 ReactiveCocoa/Objective-C/RACDynamicPropertySuperclass.h
+0 −22 ReactiveCocoa/Objective-C/RACDynamicPropertySuperclass.m
+24 −20 ReactiveCocoa/Objective-C/RACSignal+Operations.h
+17 −13 ReactiveCocoa/Objective-C/RACSignal.h
+0 −1 ReactiveCocoa/ReactiveCocoa.h
+39 −37 ReactiveCocoa/Swift/Action.swift
+115 −40 ReactiveCocoa/Swift/Atomic.swift
+10 −5 ReactiveCocoa/Swift/Bag.swift
+16 −16 ReactiveCocoa/Swift/CocoaAction.swift
+252 −0 ReactiveCocoa/Swift/Deprecations+Removals.swift
+31 −40 ReactiveCocoa/Swift/Disposable.swift
+82 −41 ReactiveCocoa/Swift/DynamicProperty.swift
+42 −42 ReactiveCocoa/Swift/Event.swift
+43 −33 ReactiveCocoa/Swift/EventLogger.swift
+177 −236 ReactiveCocoa/Swift/Flatten.swift
+8 −8 ReactiveCocoa/Swift/FoundationExtensions.swift
+39 −0 ReactiveCocoa/Swift/Lifetime.swift
+345 −0 ReactiveCocoa/Swift/NSObject+KeyValueObserving.swift
+135 −76 ReactiveCocoa/Swift/ObjectiveCBridging.swift
+37 −32 ReactiveCocoa/Swift/Observer.swift
+22 −2 ReactiveCocoa/Swift/Optional.swift
+625 −118 ReactiveCocoa/Swift/Property.swift
+137 −98 ReactiveCocoa/Swift/Scheduler.swift
+434 −458 ReactiveCocoa/Swift/Signal.swift
+606 −690 ReactiveCocoa/Swift/SignalProducer.swift
+8 −8 ReactiveCocoa/Swift/TupleExtensions.swift
+17 −1 ReactiveCocoaTests/Objective-C/RACKVOProxySpec.m
+16 −16 ReactiveCocoaTests/Swift/ActionSpec.swift
+1 −1 ReactiveCocoaTests/Swift/AtomicSpec.swift
+3 −3 ReactiveCocoaTests/Swift/BagSpec.swift
+7 −7 ReactiveCocoaTests/Swift/CocoaActionSpec.swift
+28 −28 ReactiveCocoaTests/Swift/DisposableSpec.swift
+44 −44 ReactiveCocoaTests/Swift/FlattenSpec.swift
+13 −8 ReactiveCocoaTests/Swift/FoundationExtensionsSpec.swift
+377 −0 ReactiveCocoaTests/Swift/KeyValueObservingSpec.swift
+80 −0 ReactiveCocoaTests/Swift/LifetimeSpec.swift
+24 −25 ReactiveCocoaTests/Swift/ObjectiveCBridgingSpec.swift
+1,132 −110 ReactiveCocoaTests/Swift/PropertySpec.swift
+55 −45 ReactiveCocoaTests/Swift/SchedulerSpec.swift
+7 −7 ReactiveCocoaTests/Swift/SignalLifetimeSpec.swift
+117 −98 ReactiveCocoaTests/Swift/SignalProducerLiftingSpec.swift
+6 −6 ReactiveCocoaTests/Swift/SignalProducerNimbleMatchers.swift
+403 −454 ReactiveCocoaTests/Swift/SignalProducerSpec.swift
+153 −147 ReactiveCocoaTests/Swift/SignalSpec.swift
+6 −6 ReactiveCocoaTests/Swift/TestError.swift
+3 −3 ReactiveCocoaTests/Swift/TestLogger.swift
+6 −1 script/validate-playground.sh
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Result
26 changes: 21 additions & 5 deletions ReactiveTask.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = Carthage;
TargetAttributes = {
D0BFEA571A2D1E5E00E23194 = {
Expand Down Expand Up @@ -350,10 +350,12 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D0BFEA781A2D1E7C00E23194 /* Debug.xcconfig */;
buildSettings = {
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CURRENT_PROJECT_VERSION = 1;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.10;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RAC target was switched back to 10.9. Can we keep this at 10.9 too?

ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_VERSION = 2.3;
Expand All @@ -366,9 +368,11 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D0BFEA7A1A2D1E7C00E23194 /* Release.xcconfig */;
buildSettings = {
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CURRENT_PROJECT_VERSION = 1;
GCC_NO_COMMON_BLOCKS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.10;
SDKROOT = macosx;
SWIFT_VERSION = 2.3;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -386,6 +390,7 @@
INFOPLIST_FILE = ReactiveTask/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -399,6 +404,7 @@
INFOPLIST_FILE = ReactiveTask/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -413,6 +419,7 @@
INFOPLIST_FILE = ReactiveTaskTests/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -427,16 +434,19 @@
INFOPLIST_FILE = ReactiveTaskTests/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
D0BFEA991A2D1F8B00E23194 /* Test */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D0BFEA7B1A2D1E7C00E23194 /* Test.xcconfig */;
buildSettings = {
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CURRENT_PROJECT_VERSION = 1;
GCC_NO_COMMON_BLOCKS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.10;
SDKROOT = macosx;
SWIFT_VERSION = 2.3;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -454,6 +464,7 @@
INFOPLIST_FILE = ReactiveTask/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Test;
};
Expand All @@ -468,16 +479,19 @@
INFOPLIST_FILE = ReactiveTaskTests/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Test;
};
D0BFEA9C1A2D1F8E00E23194 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D0BFEA791A2D1E7C00E23194 /* Profile.xcconfig */;
buildSettings = {
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CURRENT_PROJECT_VERSION = 1;
GCC_NO_COMMON_BLOCKS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.10;
SDKROOT = macosx;
SWIFT_VERSION = 2.3;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -495,6 +509,7 @@
INFOPLIST_FILE = ReactiveTask/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Profile;
};
Expand All @@ -509,6 +524,7 @@
INFOPLIST_FILE = ReactiveTaskTests/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Profile;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
14 changes: 7 additions & 7 deletions ReactiveTask/Errors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,37 @@ import Foundation
import ReactiveCocoa

/// An error originating from ReactiveTask.
public enum TaskError: ErrorType, Equatable {
public enum TaskError: Error, Equatable {
/// A shell task exited unsuccessfully.
case ShellTaskFailed(Task, exitCode: Int32, standardError: String?)
case shellTaskFailed(Task, exitCode: Int32, standardError: String?)

/// An error was returned from a POSIX API.
case POSIXError(Int32)
case posixError(Int32)
}

extension TaskError: CustomStringConvertible {
public var description: String {
switch self {
case let .ShellTaskFailed(task, exitCode, standardError):
case let .shellTaskFailed(task, exitCode, standardError):
var description = "A shell task (\(task)) failed with exit code \(exitCode)"
if let standardError = standardError {
description += ":\n\(standardError)"
}

return description

case let .POSIXError(code):
case let .posixError(code):
return NSError(domain: NSPOSIXErrorDomain, code: Int(code), userInfo: nil).description
}
}
}

public func == (lhs: TaskError, rhs: TaskError) -> Bool {
switch (lhs, rhs) {
case let (.ShellTaskFailed(lhsTask, lhsCode, lhsErr), .ShellTaskFailed(rhsTask, rhsCode, rhsErr)):
case let (.shellTaskFailed(lhsTask, lhsCode, lhsErr), .shellTaskFailed(rhsTask, rhsCode, rhsErr)):
return lhsTask == rhsTask && lhsCode == rhsCode && lhsErr == rhsErr

case let (.POSIXError(lhsCode), .POSIXError(rhsCode)):
case let (.posixError(lhsCode), .posixError(rhsCode)):
return lhsCode == rhsCode

default:
Expand Down
Loading