From 77751d464bed20209536c70d48834fa905e1b3d0 Mon Sep 17 00:00:00 2001 From: Danny Sung Date: Tue, 2 Nov 2021 16:41:13 -0700 Subject: [PATCH] Support latest NIO code; Make Swift 5.2 the minimum supported version (#254) * Support latest NIO code; Make Swift 5.2 the minimum supported version (required by NIO) * Package.swift updates for Swift 5.2 * remove .swift-version file * Fix BlueSSLService dependency reference * Remove Xcode 11 support because it requires Swift 5.1 --- .swift-version | 1 - .travis.yml | 11 +++-------- Package.swift | 17 +++++++++++++---- 3 files changed, 16 insertions(+), 13 deletions(-) delete mode 100644 .swift-version diff --git a/.swift-version b/.swift-version deleted file mode 100644 index a75b92f1..00000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -5.1 diff --git a/.travis.yml b/.travis.yml index 6fab7ee1..98be0efc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,12 +15,7 @@ matrix: dist: xenial sudo: required services: docker - env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci:5.0.3 SWIFT_SNAPSHOT=5.0.3 DOCKER_PRIVILEGED=true SWIFT_TEST_ARGS="--parallel" - - os: linux - dist: xenial - sudo: required - services: docker - env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu16.04:5.1.5 DOCKER_PRIVILEGED=true SWIFT_TEST_ARGS="--parallel --sanitize=thread" CUSTOM_TEST_SCRIPT=.kitura-test.sh + env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu16.04:5.2.5 DOCKER_PRIVILEGED=true SWIFT_TEST_ARGS="--parallel --sanitize=thread" CUSTOM_TEST_SCRIPT=.kitura-test.sh - os: linux dist: xenial sudo: required @@ -33,11 +28,11 @@ matrix: env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:latest USE_SWIFT_DEVELOPMENT_SNAPSHOT=1 DOCKER_PRIVILEGED=true SWIFT_TEST_ARGS="--parallel --sanitize=thread" - os: osx - osx_image: xcode11.3 + osx_image: xcode12.2 sudo: required env: JAZZY_ELIGIBLE=true SWIFT_TEST_ARGS="--parallel --sanitize=thread" - os: osx - osx_image: xcode12.2 + osx_image: xcode12.5 sudo: required env: SWIFT_TEST_ARGS="--parallel --sanitize=thread" - os: osx diff --git a/Package.swift b/Package.swift index 1da1be5d..1bc85c64 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. /* * Copyright IBM Corporation and the Kitura project authors 2016-2020 @@ -27,10 +27,10 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/apple/swift-nio.git", from: "2.8.0"), + .package(url: "https://github.com/apple/swift-nio.git", from: "2.33.0"), .package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0"), .package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.0.0"), - .package(url: "https://github.com/Kitura/BlueSSLService.git", from: "2.0.0"), + .package(name: "SSLService", url: "https://github.com/Kitura/BlueSSLService.git", from: "2.0.1"), .package(url: "https://github.com/Kitura/LoggerAPI.git", from: "2.0.0") ], targets: [ @@ -39,7 +39,16 @@ let package = Package( dependencies: []), .target( name: "KituraNet", - dependencies: ["NIO", "NIOFoundationCompat", "NIOHTTP1", "NIOSSL", "SSLService", "LoggerAPI", "NIOWebSocket", "CLinuxHelpers", "NIOConcurrencyHelpers", "NIOExtras"]), + dependencies: [ + .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOFoundationCompat", package: "swift-nio"), + .product(name: "NIOHTTP1", package: "swift-nio"), + .product(name: "NIOSSL", package: "swift-nio-ssl"), + "SSLService", + .product(name: "NIOWebSocket", package: "swift-nio"), + .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), + .product(name: "NIOExtras", package: "swift-nio-extras"), + "LoggerAPI", "CLinuxHelpers"]), .testTarget( name: "KituraNetTests", dependencies: ["KituraNet"])