Skip to content

Commit 92bcf49

Browse files
authored
Make Swift 5.2 the minimum required version (#378)
We're applying this change across all of the NIO family of projects. I've removed the docker files for earlier versions, and set the tools version. I've also added a brief note inside the contributing guide.
1 parent 711622b commit 92bcf49

9 files changed

+31
-64
lines changed

Diff for: CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ A good AsyncHTTPClient patch is:
5757
3. Documented, adding API documentation as needed to cover new functions and properties.
5858
4. Accompanied by a great commit message, using our commit message template.
5959

60+
*Note* as of version 1.5.0 AsyncHTTPClient requires Swift 5.2. Earlier versions support as far back as Swift 5.0.
61+
6062
### Commit Message Template
6163

6264
We require that your commit messages match our template. The easiest way to do that is to get git to help you by explicitly using the template. To do that, `cd` to the root of our repository and run:

Diff for: Package.swift

+22-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.0
1+
// swift-tools-version:5.2
22
//===----------------------------------------------------------------------===//
33
//
44
// This source file is part of the AsyncHTTPClient open source project
@@ -30,13 +30,30 @@ let package = Package(
3030
targets: [
3131
.target(
3232
name: "AsyncHTTPClient",
33-
dependencies: ["NIO", "NIOHTTP1", "NIOSSL", "NIOConcurrencyHelpers", "NIOHTTPCompression",
34-
"NIOFoundationCompat", "NIOTransportServices", "Logging", "NIOSOCKS"]
33+
dependencies: [
34+
.product(name: "NIO", package: "swift-nio"),
35+
.product(name: "NIOHTTP1", package: "swift-nio"),
36+
.product(name: "NIOSSL", package: "swift-nio-ssl"),
37+
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
38+
.product(name: "NIOHTTPCompression", package: "swift-nio-extras"),
39+
.product(name: "NIOFoundationCompat", package: "swift-nio"),
40+
.product(name: "NIOTransportServices", package: "swift-nio-transport-services"),
41+
.product(name: "Logging", package: "swift-log"),
42+
.product(name: "NIOSOCKS", package: "swift-nio-extras"),
43+
]
3544
),
3645
.testTarget(
3746
name: "AsyncHTTPClientTests",
38-
dependencies: ["NIO", "NIOConcurrencyHelpers", "NIOSSL", "AsyncHTTPClient", "NIOFoundationCompat",
39-
"NIOTestUtils", "Logging", "NIOSOCKS"]
47+
dependencies: [
48+
.product(name: "NIO", package: "swift-nio"),
49+
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
50+
.product(name: "NIOSSL", package: "swift-nio-ssl"),
51+
"AsyncHTTPClient",
52+
.product(name: "NIOFoundationCompat", package: "swift-nio"),
53+
.product(name: "NIOTestUtils", package: "swift-nio"),
54+
.product(name: "Logging", package: "swift-log"),
55+
.product(name: "NIOSOCKS", package: "swift-nio-extras"),
56+
]
4057
),
4158
]
4259
)

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This library provides the following:
1010

1111
---
1212

13-
**NOTE**: You will need [Xcode 10.2](https://itunes.apple.com/us/app/xcode/id497799835) or [Swift 5.0](https://swift.org/download/#swift-50) to try out `AsyncHTTPClient`.
13+
**NOTE**: You will need [Xcode 11.4](https://apps.apple.com/gb/app/xcode/id497799835?mt=12) or [Swift 5.2](https://swift.org/download/#swift-52) to try out `AsyncHTTPClient`.
1414

1515
---
1616

Diff for: docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG swift_version=5.0
1+
ARG swift_version=5.2
22
ARG ubuntu_version=bionic
33
ARG base_image=swift:$swift_version-$ubuntu_version
44
FROM $base_image

Diff for: docker/docker-compose.1604.51.yaml renamed to docker/docker-compose.1604.52.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ version: "3"
33
services:
44

55
runtime-setup:
6-
image: async-http-client:16.04-5.1
6+
image: async-http-client:16.04-5.2
77
build:
88
args:
99
ubuntu_version: "xenial"
10-
swift_version: "5.1"
10+
swift_version: "5.2"
1111

1212
test:
13-
image: async-http-client:16.04-5.1
13+
image: async-http-client:16.04-5.2
1414
environment:
1515
- SANITIZER_ARG=--sanitize=thread
1616

1717
shell:
18-
image: async-http-client:16.04-5.1
18+
image: async-http-client:16.04-5.2

Diff for: docker/docker-compose.1804.50.yaml

-16
This file was deleted.

Diff for: docker/docker-compose.1804.51.yaml

-18
This file was deleted.

Diff for: docker/docker-compose.1804.52.yaml

-18
This file was deleted.

Diff for: scripts/check_no_api_breakages.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ for old_tag in "$@"; do
115115
--input-paths "$tmpdir/api-old/$f" -input-paths "$tmpdir/api-new/$f" 2>&1 \
116116
> "$report" 2>&1
117117

118-
if ! shasum "$report" | grep -q cefc4ee5bb7bcdb7cb5a7747efa178dab3c794d5; then
118+
if ! shasum "$report" | grep -q afd2a1b542b33273920d65821deddc653063c700; then
119119
echo ERROR
120120
echo >&2 "=============================="
121121
echo >&2 "ERROR: public API change in $f"

0 commit comments

Comments
 (0)