-
Notifications
You must be signed in to change notification settings - Fork 148
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
Upgrade to Swift 5! #464
Upgrade to Swift 5! #464
Conversation
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.
Cool, thanks for this! One little Q mostly just for my own curiosity, but looks good.
@@ -543,6 +543,9 @@ extension EditViewController { | |||
|
|||
case .hideReplaceInterface: | |||
Swift.print("hideReplaceInterface not implemented") | |||
|
|||
@unknown default: |
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.
what's this syntax? Can you link me a reference?
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 just learned about it while upgrading also. It allows us to have an exhaustive enum with a default
case to protect against future additions to the enum. If we don't put the @unknown
on the default
, the compiler will complain that we've covered all the cases already.
https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md#unknown
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.
cool, thanks!
Summary
This PR upgrades the codebase to Swift 5. It will require compiling with Xcode 10.2.
The most significant change is the raw byte handling in
RPCSending.swift
so please review that closely... I think I've gotten it right with hopefully similar performance!Related Issues
Related to #463
Example: Closes #461
Checklist
Review Checklist