envoy / Embassy

Super lightweight async HTTP server library in pure Swift runs in iOS / MacOS / Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift 3.0 support

dagio opened this issue · comments

Is there someone working on swift 3.0 support ?

Hi @dagio. It's not planned right now, we are still waiting until all our dependencies are released with Swift 3 support.
Happy to accept patches though.

@ropiku I've migrated our repository to Swift 3 (https://github.com/reTXT/Embassy/tree/swift3). All tests are passing with the exception of testCloseByPeer which fails intermittently; but it seems to do that even before my changes. I am more than happy to submit a PR but you'll need to create a swift3 branch to keep both versions simultaneously.

FYI, Ambassador has been migrated as well (https://github.com/reTXT/Ambassador/tree/swift3)

@kdubb this is awesome! thanks for the Swift 3 migration, I think I will create a swift3 branch first, pull your changes into it.

However, before that, a quick question, I am not super familiar with Swift 3 coding guideline, but it appears that you changed all protocol, like ServerType to Server. Is that suggested by Swift 3 style guideline or something?

@victorlin Almost all Swift protocols that used to end in "Type" were changed to drop the "Type". For example, SequenceType is now Sequence and CollectionType is now Collection.

Also, please note that since the Swift 3 migration, I've also move the project to a multi-platform format (it now supports macOS as well) and added regular expression matching to the Router class. Just wanted to warn you before you pulled my changes in.