-
Notifications
You must be signed in to change notification settings - Fork 429
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
Xcode 10 support #644
Xcode 10 support #644
Conversation
Sources/ValidatingProperty.swift
Outdated
/// - inner: The inner property which validated values are committed to. | ||
/// - other: The property that `validator` depends on. | ||
/// - validator: The closure to invoke for any proposed value to `self`. | ||
public convenience init<U, E>( |
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.
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.
The following overload will be used instead after this removal:
ReactiveSwift/Sources/ValidatingProperty.swift
Lines 128 to 132 in 7c25bc2
public convenience init<Other: PropertyProtocol>( | |
_ inner: MutableProperty<Value>, | |
with other: Other, | |
_ validator: @escaping (Value, Other.Value) -> Decision | |
) { |
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.
I think this makes sense 👍
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.
This looks good to me 👍
@@ -2791,7 +2791,7 @@ class SignalProducerSpec: QuickSpec { | |||
let producer = SignalProducer<Int, NoError>.never | |||
.on(disposed: { disposed = true }) | |||
|
|||
var replayedProducer = ImplicitlyUnwrappedOptional(producer.replayLazily(upTo: 1)) | |||
var replayedProducer = Optional(producer.replayLazily(upTo: 1)) |
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.
So we were using it as a regular optional anyway? Huh.
Do you want to move the headers phase before the compile sources phase as part of this? |
Addressed in eb2bae1! |
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.
🙏
Sources/ValidatingProperty.swift
Outdated
/// - inner: The inner property which validated values are committed to. | ||
/// - other: The property that `validator` depends on. | ||
/// - validator: The closure to invoke for any proposed value to `self`. | ||
public convenience init<U, E>( |
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.
This changes the semantic. This overload was supposed to be the primary one, and the removed one here should have been implemented in terms of that.
Edit: Dropping down to PropertyProtocol
leads to only successfully validated values from other
being considered, while the intended semantic is to propagate any proposed value (regardless of its validation outcome) so that live validations are always reacting to any user interaction made.
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.
So what should be done here to avoid the compilation error instead of the removal? @andersio
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.
Feel free pushing your changes on this branch.
Checklist