diff --git a/Package.swift b/Package.swift index 3a5cacfb..8b29bc75 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.2 //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project @@ -16,22 +16,81 @@ import PackageDescription var targets: [PackageDescription.Target] = [ - .target(name: "NIOExtras", dependencies: ["NIO"]), - .target(name: "NIOHTTPCompression", dependencies: ["NIO", "NIOHTTP1", "CNIOExtrasZlib"]), - .target(name: "HTTPServerWithQuiescingDemo", dependencies: ["NIOExtras", "NIOHTTP1"]), - .target(name: "NIOWritePCAPDemo", dependencies: ["NIO", "NIOExtras", "NIOHTTP1"]), - .target(name: "NIOWritePartialPCAPDemo", dependencies: ["NIO", "NIOExtras", "NIOHTTP1"]), - .target(name: "NIOExtrasPerformanceTester", dependencies: ["NIO", "NIOExtras", "NIOHTTP1"]), - .target(name: "NIOSOCKS", dependencies: ["NIO"]), - .target(name: "NIOSOCKSClient", dependencies: ["NIO", "NIOSOCKS"]), - .target(name: "CNIOExtrasZlib", - dependencies: [], - linkerSettings: [ - .linkedLibrary("z") - ]), - .testTarget(name: "NIOExtrasTests", dependencies: ["NIOExtras", "NIO", "NIOTestUtils", "NIOConcurrencyHelpers"]), - .testTarget(name: "NIOHTTPCompressionTests", dependencies: ["NIOHTTPCompression"]), - .testTarget(name: "NIOSOCKSTests", dependencies: ["NIO", "NIOSOCKS"]) + .target( + name: "NIOExtras", + dependencies: [ + .product(name: "NIO", package: "swift-nio") + ]), + .target( + name: "NIOHTTPCompression", + dependencies: [ + "CNIOExtrasZlib", + .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOHTTP1", package: "swift-nio"), + ]), + .target( + name: "HTTPServerWithQuiescingDemo", + dependencies: [ + "NIOExtras", + .product(name: "NIOHTTP1", package: "swift-nio"), + ]), + .target( + name: "NIOWritePCAPDemo", + dependencies: [ + "NIOExtras", + .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOHTTP1", package: "swift-nio"), + ]), + .target( + name: "NIOWritePartialPCAPDemo", + dependencies: [ + "NIOExtras", + .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOHTTP1", package: "swift-nio"), + ]), + .target( + name: "NIOExtrasPerformanceTester", + dependencies: [ + "NIOExtras", + .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOHTTP1", package: "swift-nio"), + ]), + .target( + name: "NIOSOCKS", + dependencies: [ + .product(name: "NIO", package: "swift-nio") + ]), + .target( + name: "NIOSOCKSClient", + dependencies: [ + .product(name: "NIO", package: "swift-nio"), + "NIOSOCKS" + ]), + .target( + name: "CNIOExtrasZlib", + dependencies: [], + linkerSettings: [ + .linkedLibrary("z") + ]), + .testTarget( + name: "NIOExtrasTests", + dependencies: [ + "NIOExtras", + .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOTestUtils", package: "swift-nio"), + .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), + ]), + .testTarget( + name: "NIOHTTPCompressionTests", + dependencies: [ + "NIOHTTPCompression" + ]), + .testTarget( + name: "NIOSOCKSTests", + dependencies: [ + "NIOSOCKS", + .product(name: "NIO", package: "swift-nio"), + ]) ] let package = Package( diff --git a/README.md b/README.md index 76352e19..fc6ed3da 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ All code will go through code review like in the other repositories related to t `swift-nio-extras` part of the SwiftNIO 2 family of repositories and depends on the following: -- [`swift-nio`](https://github.com/apple/swift-nio), version 2.0.0 or better. -- Swift 5.0. +- [`swift-nio`](https://github.com/apple/swift-nio), version 2.29.0 or better. +- Swift 5.2. - `zlib` and its development headers installed on the system. But don't worry, you'll find `zlib` on pretty much any UNIX system that can compile any sort of code. To depend on `swift-nio-extras`, put the following in the `dependencies` of your `Package.swift`: @@ -25,6 +25,8 @@ To depend on `swift-nio-extras`, put the following in the `dependencies` of your ### Support for older Swift versions +Earlier versions of SwiftNIO (2.29.x and lower) and SwiftNIOExtras (1.9.x and lower) supported Swift 5.0 and 5.1. + On the [`nio-extras-0.1`](https://github.com/apple/swift-nio-extras/tree/nio-extras-0.1) branch, you can find the `swift-nio-extras` version for the SwiftNIO 1 family. It requires Swift 4.1 or better. ## Current Contents diff --git a/docker/Dockerfile b/docker/Dockerfile index 74768832..7cd7b264 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ -ARG swift_version=5.0 -ARG ubuntu_version=bionic +ARG swift_version=5.2 +ARG ubuntu_version=focal ARG base_image=swift:$swift_version-$ubuntu_version FROM $base_image # needed to do again after FROM due to docker limitation diff --git a/docker/docker-compose.1604.51.yaml b/docker/docker-compose.1604.52.yaml similarity index 54% rename from docker/docker-compose.1604.51.yaml rename to docker/docker-compose.1604.52.yaml index 0257682d..3a6a8000 100644 --- a/docker/docker-compose.1604.51.yaml +++ b/docker/docker-compose.1604.52.yaml @@ -3,16 +3,16 @@ version: "3" services: runtime-setup: - image: swift-nio-extras:16.04-5.1 + image: swift-nio-extras:16.04-5.2 build: args: ubuntu_version: "xenial" - swift_version: "5.1" + swift_version: "5.2" test: - image: swift-nio-extras:16.04-5.1 + image: swift-nio-extras:16.04-5.2 environment: - SANITIZER_ARG=--sanitize=thread shell: - image: swift-nio-extras:16.04-5.1 + image: swift-nio-extras:16.04-5.2 diff --git a/docker/docker-compose.1804.50.yaml b/docker/docker-compose.1804.50.yaml deleted file mode 100644 index bd0e9d93..00000000 --- a/docker/docker-compose.1804.50.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: swift-nio-extras:18.04-5.0 - build: - args: - ubuntu_version: "bionic" - swift_version: "5.0" - - test: - image: swift-nio-extras:18.04-5.0 - - shell: - image: swift-nio-extras:18.04-5.0 diff --git a/docker/docker-compose.1804.52.yaml b/docker/docker-compose.1804.52.yaml deleted file mode 100644 index 90fabd27..00000000 --- a/docker/docker-compose.1804.52.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: swift-nio-extras:18.04-5.2 - build: - args: - ubuntu_version: "bionic" - swift_version: "5.2" - - test: - image: swift-nio-extras:18.04-5.2 - - shell: - image: swift-nio-extras:18.04-5.2 diff --git a/scripts/check_no_api_breakages.sh b/scripts/check_no_api_breakages.sh index b8ad893d..ec3dc312 100755 --- a/scripts/check_no_api_breakages.sh +++ b/scripts/check_no_api_breakages.sh @@ -109,7 +109,7 @@ for old_tag in "$@"; do > "$report" 2>&1 fi - if ! shasum "$report" | grep -q cefc4ee5bb7bcdb7cb5a7747efa178dab3c794d5; then + if ! shasum "$report" | grep -q afd2a1b542b33273920d65821deddc653063c700; then echo ERROR echo >&2 "==============================" echo >&2 "ERROR: public API change in $f"