# SwiftNIO 2 repository convergence plan

**URL:** <https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387>\
**Category:** SwiftNIO\
**Created:** [March 8, 2019, 7:23pm UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387 "2019-03-08T19:23:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![johannesweiss](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/johannesweiss/32/38183_2.png) [@johannesweiss](https://forums.swift.org/u/johannesweiss)\
**Post date:** [March 8, 2019, 7:23pm UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387/1 "2019-03-08T19:23:07Z")

</div>

# 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`](https://github.com/apple/swift-nio), which is converging towards the `2.0.0` release as of 8th March 2019, the tag is [`2.0.0-convergence.1`](https://github.com/apple/swift-nio/tree/2.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`](https://github.com/apple/swift-nio-extras), which is converging towards the `1.0.0` release as of _today_ (8th March 2019), the tag is [`1.0.0-convergence.1`](https://github.com/apple/swift-nio-extras/tree/1.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`](https://github.com/apple/swift-nio-ssl), which is converging towards the `2.0.0` release as of 13th March 2019, the tag is [`2.0.0-convergence.1`](https://github.com/apple/swift-nio-ssl/tree/2.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`](https://github.com/apple/swift-nio-transport-services), which is converging towards the `1.0.0` release as of 15th March 2019, the tag is [`1.0.0-convergence.1`](https://github.com/apple/swift-nio-transport-services/tree/1.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`](https://github.com/apple/swift-nio-http2), which is converging towards the `1.0.0` release as of 15th March 2019, the tag is [`1.0.0-convergence.1`](https://github.com/apple/swift-nio-http2/tree/1.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](https://github.com/apple/swift-nio/blob/master/docs/public-api-changes-NIO1-to-NIO2.md) as well as a [migration guide](https://github.com/apple/swift-nio/blob/master/docs/migration-guide-NIO1-to-NIO2.md) 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](https://forums.swift.org/t/rfc-moving-swiftnio-ssl-to-boringssl/18280). 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](https://github.com/apple/swift-nio-http2/pull/40) 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!

---

<div class="post-metadata">

**Author:** ![satishb](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@satishb](https://forums.swift.org/u/satishb)\
**Post date:** [March 9, 2019, 9:39am UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387/2 "2019-03-09T09:39:33Z")

</div>

@johannesweiss is [`swift-nio-http2`](https://github.com/apple/swift-nio-http2) is going to be part of [`swift-nio`](https://github.com/apple/swift-nio) main reposotory ?  
where [NIOHTTP1](https://github.com/apple/swift-nio/tree/master/Sources/NIOHTTP1) and [NIOHTTP2](https://github.com/apple/swift-nio/tree/master/Sources/NIOHTTP2) are in same repo ?

---

<div class="post-metadata">

**Author:** ![johannesweiss](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/johannesweiss/32/38183_2.png) [@johannesweiss](https://forums.swift.org/u/johannesweiss)\
**Post date:** [March 9, 2019, 11:22am UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387/3 "2019-03-09T11:22:21Z")

</div>

> [@satishb](#):
>
> @johannesweiss is [`swift-nio-http2`](https://github.com/apple/swift-nio-http2) is going to be part of [`swift-nio`](https://github.com/apple/swift-nio) main reposotory ?  
> where [NIOHTTP1](https://github.com/apple/swift-nio/tree/master/Sources/NIOHTTP1) and [NIOHTTP2](https://github.com/apple/swift-nio/tree/master/Sources/NIOHTTP2) are in same repo ?

The plan is to leave them in separate repositories. But over time we might change the HTTP types to be more “plain HTTP semantics” rather than HTTP/1 centric as they are today. For example the version number has major/minor which is a HTTP1-ism, in HTTP/2 there's no concept of a minor version so that field might just go. But that will obviously not happen before NIO 3 (which isn’t planned at all yet and will be quite a while out given that NIO 2 isn’t even released yet) as that would be an API breaking change.

---

<div class="post-metadata">

**Author:** ![lukasa](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lukasa/32/1232_2.png) [@lukasa](https://forums.swift.org/u/lukasa)\
**Post date:** [March 9, 2019, 11:29am UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387/4 "2019-03-09T11:29:12Z")

</div>

> [@johannesweiss](#):
>
> But that will obviously not happen before NIO 3 (which isn’t planned at all yet and will be quite a while out given that NIO 2 isn’t even released yet) as that would be an API breaking change.

I suspect we’ll probably more likely end up adding a translation layer, so that instead of the data types for HTTP/2 being translated into HTTP/1 data types, both H2 and H1 are translated to a common third data type that unifies just the core concepts. That can probably be done as a SemVer minor opt-in feature, so I’m not in any rush to do that: the current data types work fine for now.

---

<div class="post-metadata">

**Author:** ![johannesweiss](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/johannesweiss/32/38183_2.png) [@johannesweiss](https://forums.swift.org/u/johannesweiss)\
**Post date:** [March 9, 2019, 11:55am UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387/5 "2019-03-09T11:55:28Z")

</div>

Ah yes, you’re right, that’s well possible.

---

<div class="post-metadata">

**Author:** ![johannesweiss](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/johannesweiss/32/38183_2.png) [@johannesweiss](https://forums.swift.org/u/johannesweiss)\
**Post date:** [March 13, 2019, 4:52pm UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387/6 "2019-03-13T16:52:43Z")

</div>

`swift-nio-ssl` is now converging, tag is [`2.0.0-convergence.1`](https://github.com/apple/swift-nio-ssl/tree/2.0.0-convergence.1)

---

<div class="post-metadata">

**Author:** ![lukasa](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lukasa/32/1232_2.png) [@lukasa](https://forums.swift.org/u/lukasa)\
**Post date:** [March 15, 2019, 2:49pm UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387/7 "2019-03-15T14:49:49Z")

</div>

`swift-nio-http2` is now converging, tag is [`1.0.0-convergence.1`](https://github.com/apple/swift-nio-http2/commit/d9f11317499f008ddebfef2d44fcc62ba1b49410).

---

<div class="post-metadata">

**Author:** ![lukasa](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lukasa/32/1232_2.png) [@lukasa](https://forums.swift.org/u/lukasa)\
**Post date:** [March 15, 2019, 2:50pm UTC](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387/8 "2019-03-15T14:50:23Z")

</div>

`swift-nio-transport-services` is now converging, tag is [`1.0.0-convergence.1`](https://github.com/apple/swift-nio-transport-services/commit/e1685ae770ca1175409a766aaf344c3491007181).
