SwiftNIO 2 repository convergence plan
We are very happy to announce that SwiftNIO 2.0 is starting the convergence phase today.
Just to be very clear: This is not the announcement of any final SwiftNIO 2 releases, it's merely the start of the convergence plan towards them.
And just in case you wonder: If you are still on NIO 1, there's no need to take action today. NIO 1 will continue to work on all Swift 4 and Swift 5 versions as it does today. But in case you want to live on the bleeding edge, you can now give the first NIO 2 convergence releases a spin .
Thank you so much for all the contributions, the swift-nio
repository alone is now up to 75 different contributors which we're super thrilled about. That means SwiftNIO gained a new contributor every 5 days in the one year that SwiftNIO has been an open-source project .
As soon as the convergence phase for a repository is started we try very hard to no longer break public API before the final release is out. In convergence, we won't remove/change existing public API so that all of our dependents can start migrating their projects to NIO 2 without the risk of their code breaking because of a SwiftNIO change. Because SwiftNIO usually forms the lowest layer in the dependency hierarchy we believe that it is important to give our users a bit of time to migrate their code before the final release is out. We also hope to squeeze out a few more bugs before the release.
What repositories are part of the SwiftNIO project
The SwiftNIO project is formed of a family of repositories which will all converge towards a new major revision. Somewhat confusingly, the major revision is not always 2
because some of the repositories were using the major version 0
in their corresponding NIO 1 branch.
Please find below a full list of the repositories which form the SwiftNIO project and the major versions they will converge towards.
-
swift-nio
, which is converging towards the2.0.0
release as of 8th March 2019, the tag is2.0.0-convergence.1
. To depend on this release, you can use
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0-convergence.1")
-
swift-nio-extras
, which is converging towards the1.0.0
release as of today (8th March 2019), the tag is1.0.0-convergence.1
. To depend on this release, you can use
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.0.0-convergence.1")
-
swift-nio-ssl
, which is converging towards the2.0.0
release as of 13th March 2019, the tag is2.0.0-convergence.1
. To depend on this release, you can use
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0-convergence.1")
-
swift-nio-transport-services
, which is converging towards the1.0.0
release as of 15th March 2019, the tag is1.0.0-convergence.1
. To depend on this release, you can use
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.0.0-convergence.1")
-
swift-nio-http2
, which is converging towards the1.0.0
release as of 15th March 2019, the tag is1.0.0-convergence.1
. To depend on this release, you can use
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.0.0-convergence.1")
What are the main changes from NIO 1 to NIO 2
The biggest change is that all of the NIO 2 repositories will require the upcoming Swift 5. Please find a summary of the changes in the individual repositories below.
swift-nio
repository
We maintain a list of public API changes from NIO 1 to NIO 2 as well as a migration guide that will hopefully help you make a smooth transition.
swift-nio-extras
repository
Mostly updated to support NIO 2.
swift-nio-transport-services
repository
Mostly updated to support NIO 2.
swift-nio-ssl
repository
There is a big change here: We no longer depend on the system's Open/LibreSSL version and will vendor a name-spaced copy of BoringSSL instead as previously discussed on the forums. Despite this big change, the impact on your code should be minimal, in many cases the only change required is to add NIOSSLHandler
to your ChannelPipeline
rather than OpenSSLHandler
.
swift-nio-http2
repository
Another really big change here: We no longer depend on the system's libnghttp2
for HTTP/2 but instead have a shiny new pure-Swift implementation of HTTP/2. The same here: Despite this huge change, the impact on your code should be minimal.
Questions / Suggestions
If you have any questions or suggestions, please reach out to us. Either here or via Github issues on the relevant repository.
Thank you!