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

APP-677: Fix compilation errors for swift 5.2 #101

Merged
merged 1 commit into from
Mar 30, 2020
Merged

Conversation

niil-ohlin
Copy link
Contributor

@niil-ohlin niil-ohlin commented Mar 25, 2020

The noTrailingClosure trick stopped working for swift 5.2. Remove that and fix the ambiguity. The explicit requirement is only a problem internally in the framework. External code will still be able to use the trailing closure syntax.

@niil-ohlin niil-ohlin marked this pull request as ready for review March 25, 2020 20:55
@@ -24,7 +24,7 @@ public final class CoreSignal<Kind: SignalKind, Value> {
public typealias Event = Flow.Event<Value>
typealias EventType = Flow.EventType<Value>

internal init(onEventType: @escaping (@escaping (EventType) -> Void) -> Disposable, _ noTrailingClosure: Void = ()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This trick stopped working in swift 5.2

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the compiler complaining about?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The new compiler now allows init(onEventType:) to be called with trailing closure syntax. So there was ambiguity between init(onEventType:) and init(onValue:)

@niil-ohlin niil-ohlin changed the title Fix compilation errors for swift 5.2 APP-677: Fix compilation errors for swift 5.2 Mar 26, 2020
Copy link
Contributor

@moglistree moglistree left a comment

Choose a reason for hiding this comment

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

I would be fine with merging this and making a point release. Any opinions @mansbernhardt?

Comment on lines 129 to 133
test-xcode10-ios12:
macos:
xcode: "10.3.0"
steps:
- test_main_project
Copy link
Contributor

Choose a reason for hiding this comment

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

think that this can be cleaned up as well.

Comment on lines +123 to +127
test-xcode11-4-beta-ios13:
macos:
xcode: "11.4.0"
steps:
- test_main_project
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason for keeping the old runner and not making this the default runner?

@mansbernhardt
Copy link
Contributor

@moglistree As it only seems to be internal fixes and I would assume it will still compile with Swift 5.1, then it feels safe to release as a point release.

@moglistree
Copy link
Contributor

Yes I have testes swift 4.2, 5.0, 5.1 and its all good

@niil-ohlin niil-ohlin merged commit e9da9fc into master Mar 30, 2020
@niil-ohlin niil-ohlin deleted the fix-swift-5.2 branch March 30, 2020 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants