-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fix compile errors with latest ReactiveSwift #29
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
github "ReactiveCocoa/ReactiveObjC" ~> 3.0.0 | ||
github "ReactiveCocoa/ReactiveSwift" ~> 1.1 | ||
github "ReactiveCocoa/ReactiveSwift" "2.0.0-rc.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
github "jspahrsummers/xcconfigs" "3d9d996" | ||
github "Quick/Quick" ~> 1.1 | ||
github "Quick/Nimble" "8116a83864ee78339798c3ef425c42f6ca6bf034" | ||
github "Quick/Nimble" ~> 6.1 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
github "Quick/Nimble" "8116a83864ee78339798c3ef425c42f6ca6bf034" | ||
github "Quick/Nimble" "v6.1.0" | ||
github "Quick/Quick" "v1.1.0" | ||
github "ReactiveCocoa/ReactiveObjC" "3.0.0" | ||
github "antitypical/Result" "3.2.1" | ||
github "ReactiveCocoa/ReactiveSwift" "2.0.0-rc.3" | ||
github "antitypical/Result" "3.2.3" | ||
github "jspahrsummers/xcconfigs" "3d9d99634cae6d586e272543d527681283b33eb0" | ||
github "ReactiveCocoa/ReactiveSwift" "1.1.2" |
Submodule Nimble
updated
31 files
Submodule ReactiveSwift
updated
69 files
Submodule Result
updated
11 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,14 @@ import ReactiveObjC | |
import ReactiveSwift | ||
import Result | ||
|
||
extension SignalProtocol { | ||
extension Signal { | ||
/// Turns each value into an Optional. | ||
fileprivate func optionalize() -> Signal<Value?, Error> { | ||
return map(Optional.init) | ||
} | ||
} | ||
|
||
extension SignalProducerProtocol { | ||
extension SignalProducer { | ||
/// Turns each value into an Optional. | ||
fileprivate func optionalize() -> SignalProducer<Value?, Error> { | ||
return lift { $0.optionalize() } | ||
|
@@ -206,7 +206,7 @@ public func bridgedSignalProducer<First, Second, Third, Fourth, Fifth>(from sign | |
return _bridgedSignalProducer(from: signal, file: file, line: line).map { $0.map(bridgedTuple) } | ||
} | ||
|
||
extension SignalProducerProtocol where Value: AnyObject { | ||
extension SignalProducer where Value: AnyObject { | ||
/// Create a `RACSignal` that will `start()` the producer once for each | ||
/// subscription. | ||
/// | ||
|
@@ -235,7 +235,7 @@ extension SignalProducerProtocol where Value: AnyObject { | |
} | ||
} | ||
|
||
extension SignalProducerProtocol where Value: OptionalProtocol, Value.Wrapped: AnyObject { | ||
extension SignalProducer where Value: OptionalProtocol, Value.Wrapped: AnyObject { | ||
/// Create a `RACSignal` that will `start()` the producer once for each | ||
/// subscription. | ||
/// | ||
|
@@ -267,7 +267,7 @@ extension SignalProducerProtocol where Value: OptionalProtocol, Value.Wrapped: A | |
} | ||
} | ||
|
||
extension SignalProtocol where Value: AnyObject { | ||
extension Signal where Value: AnyObject { | ||
/// Create a `RACSignal` that will observe the given signal. | ||
/// | ||
/// - note: Any `interrupted` events will be silently discarded. | ||
|
@@ -295,7 +295,7 @@ extension SignalProtocol where Value: AnyObject { | |
} | ||
} | ||
|
||
extension SignalProtocol where Value: OptionalProtocol, Value.Wrapped: AnyObject { | ||
extension Signal where Value: OptionalProtocol, Value.Wrapped: AnyObject { | ||
/// Create a `RACSignal` that will observe the given signal. | ||
/// | ||
/// - note: Any `interrupted` events will be silently discarded. | ||
|
@@ -328,7 +328,7 @@ extension SignalProtocol where Value: OptionalProtocol, Value.Wrapped: AnyObject | |
|
||
// MARK: - | ||
|
||
extension ActionProtocol { | ||
extension Action { | ||
fileprivate var isCommandEnabled: RACSignal<NSNumber> { | ||
return self.isEnabled.producer | ||
.map { $0 as NSNumber } | ||
|
@@ -363,7 +363,7 @@ public func bridgedAction<Input, Output>(from command: RACCommand<Input, Output> | |
} | ||
} | ||
|
||
extension ActionProtocol where Input: AnyObject, Output: AnyObject { | ||
extension Action where Input: AnyObject, Output: AnyObject { | ||
/// Creates a RACCommand that will execute the action. | ||
/// | ||
/// - note: The returned command will not necessarily be marked as executing | ||
|
@@ -372,14 +372,14 @@ extension ActionProtocol where Input: AnyObject, Output: AnyObject { | |
/// | ||
/// - returns: `RACCommand` with bound action. | ||
public func toRACCommand() -> RACCommand<Input, Output> { | ||
return RACCommand<Input, Output>(enabled: action.isCommandEnabled) { input -> RACSignal<Output> in | ||
return RACCommand<Input, Output>(enabled: self.isCommandEnabled) { input -> RACSignal<Output> in | ||
return self.apply(input!) | ||
.toRACSignal() | ||
} | ||
} | ||
} | ||
|
||
extension ActionProtocol where Input: OptionalProtocol, Input.Wrapped: AnyObject, Output: AnyObject { | ||
extension Action where Input: OptionalProtocol, Input.Wrapped: AnyObject, Output: AnyObject { | ||
/// Creates a RACCommand that will execute the action. | ||
/// | ||
/// - note: The returned command will not necessarily be marked as executing | ||
|
@@ -388,15 +388,15 @@ extension ActionProtocol where Input: OptionalProtocol, Input.Wrapped: AnyObject | |
/// | ||
/// - returns: `RACCommand` with bound action. | ||
public func toRACCommand() -> RACCommand<Input.Wrapped, Output> { | ||
return RACCommand<Input.Wrapped, Output>(enabled: action.isCommandEnabled) { input -> RACSignal<Output> in | ||
return RACCommand<Input.Wrapped, Output>(enabled: self.isCommandEnabled) { input -> RACSignal<Output> in | ||
return self | ||
.apply(Input(reconstructing: input)) | ||
.toRACSignal() | ||
} | ||
} | ||
} | ||
|
||
extension ActionProtocol where Input: AnyObject, Output: OptionalProtocol, Output.Wrapped: AnyObject { | ||
extension Action where Input: AnyObject, Output: OptionalProtocol, Output.Wrapped: AnyObject { | ||
/// Creates a RACCommand that will execute the action. | ||
/// | ||
/// - note: The returned command will not necessarily be marked as executing | ||
|
@@ -405,15 +405,15 @@ extension ActionProtocol where Input: AnyObject, Output: OptionalProtocol, Outpu | |
/// | ||
/// - returns: `RACCommand` with bound action. | ||
public func toRACCommand() -> RACCommand<Input, Output.Wrapped> { | ||
return RACCommand<Input, Output.Wrapped>(enabled: action.isCommandEnabled) { input -> RACSignal<Output.Wrapped> in | ||
return RACCommand<Input, Output.Wrapped>(enabled: self.isCommandEnabled) { input -> RACSignal<Output.Wrapped> in | ||
return self | ||
.apply(input!) | ||
.toRACSignal() | ||
} | ||
} | ||
} | ||
|
||
extension ActionProtocol where Input: OptionalProtocol, Input.Wrapped: AnyObject, Output: OptionalProtocol, Output.Wrapped: AnyObject { | ||
extension Action where Input: OptionalProtocol, Input.Wrapped: AnyObject, Output: OptionalProtocol, Output.Wrapped: AnyObject { | ||
/// Creates a RACCommand that will execute the action. | ||
/// | ||
/// - note: The returned command will not necessarily be marked as executing | ||
|
@@ -422,7 +422,7 @@ extension ActionProtocol where Input: OptionalProtocol, Input.Wrapped: AnyObject | |
/// | ||
/// - returns: `RACCommand` with bound action. | ||
public func toRACCommand() -> RACCommand<Input.Wrapped, Output.Wrapped> { | ||
return RACCommand<Input.Wrapped, Output.Wrapped>(enabled: action.isCommandEnabled) { input -> RACSignal<Output.Wrapped> in | ||
return RACCommand<Input.Wrapped, Output.Wrapped>(enabled: self.isCommandEnabled) { input -> RACSignal<Output.Wrapped> in | ||
return self | ||
.apply(Input(reconstructing: input)) | ||
.toRACSignal() | ||
|
@@ -495,6 +495,8 @@ extension DispatchTimeInterval { | |
return TimeInterval(UInt64(us) * NSEC_PER_USEC) / TimeInterval(NSEC_PER_SEC) | ||
case let .nanoseconds(ns): | ||
return TimeInterval(ns) / TimeInterval(NSEC_PER_SEC) | ||
case let .never: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be conditionally compiled (just like we did in ReactiveSwift) to maintain compatibility with Xcode 8.2/Swift 3.1. |
||
return .infinity | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use
~> 7.0.1