From c56ababb0e22e0cdf5ec8b31698e07f943ea92e7 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 13 Apr 2023 17:21:39 +0100 Subject: [PATCH] Drop Swift 5.5 support. (#140) Motivation: Per our support policy, with the release of 5.8 we are no longer support Swift 5.5. Modifications: Drop infrastructure supporting 5.5 Remove conditional compilation guards. Result: Nice clean Swift 5.6+ repo. --- Package@swift-5.5.swift | 83 ------------------- README.md | 5 +- .../Child Channels/SSHChannelData.swift | 2 - Sources/NIOSSH/Docs.docc/index.md | 5 +- Tests/LinuxMain.swift | 14 ---- docker/docker-compose.2004.55.yaml | 25 ------ 6 files changed, 6 insertions(+), 128 deletions(-) delete mode 100644 Package@swift-5.5.swift delete mode 100644 Tests/LinuxMain.swift delete mode 100644 docker/docker-compose.2004.55.yaml diff --git a/Package@swift-5.5.swift b/Package@swift-5.5.swift deleted file mode 100644 index 580f1e5..0000000 --- a/Package@swift-5.5.swift +++ /dev/null @@ -1,83 +0,0 @@ -// swift-tools-version:5.5 -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// - -import PackageDescription - -let package = Package( - name: "swift-nio-ssh", - platforms: [ - .macOS(.v10_15), - .iOS(.v13), - .watchOS(.v6), - .tvOS(.v13), - ], - products: [ - .library(name: "NIOSSH", targets: ["NIOSSH"]), - ], - dependencies: [ - .package(url: "https://github.com/apple/swift-nio.git", from: "2.41.1"), - .package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "3.0.0"), - .package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"), - ], - targets: [ - .target( - name: "NIOSSH", - dependencies: [ - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), - .product(name: "NIOFoundationCompat", package: "swift-nio"), - .product(name: "Crypto", package: "swift-crypto"), - .product(name: "Atomics", package: "swift-atomics"), - ] - ), - .executableTarget( - name: "NIOSSHClient", - dependencies: [ - "NIOSSH", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), - ] - ), - .executableTarget( - name: "NIOSSHServer", - dependencies: [ - "NIOSSH", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOFoundationCompat", package: "swift-nio"), - .product(name: "Crypto", package: "swift-crypto"), - ] - ), - .executableTarget( - name: "NIOSSHPerformanceTester", - dependencies: [ - "NIOSSH", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOEmbedded", package: "swift-nio"), - .product(name: "Crypto", package: "swift-crypto"), - ] - ), - .testTarget( - name: "NIOSSHTests", - dependencies: [ - "NIOSSH", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOEmbedded", package: "swift-nio"), - .product(name: "NIOFoundationCompat", package: "swift-nio"), - ] - ), - ] -) diff --git a/README.md b/README.md index 51247a5..26ffb09 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,15 @@ There are a number of reasons to provide a programmatic SSH implementation. One Another good reason to provide programmatic SSH is that it is not uncommon for services to need to interact with other services in a way that involves running commands. While `Process` solves this for the local use-case, sometimes the commands that need to be invoked are remote. While `Process` could launch an `ssh` client as a sub-process in order to run this invocation, it can be substantially more straightforward to simply invoke SSH directly. This is [`libssh2`](https://www.libssh2.org)'s target use-case. SwiftNIO SSH provides the equivalent of the networking and cryptographic layer of libssh2, allowing motivated users to drive SSH sessions directly from within Swift services. -The most recent versions of SwiftNIO SSH support Swift 5.5.2 and newer. The minimum Swift version supported by SwiftNIO SSH releases are detailed below: +The most recent versions of SwiftNIO SSH support Swift 5.6 and newer. The minimum Swift version supported by SwiftNIO SSH releases are detailed below: SwiftNIO SSH | Minimum Swift Version ------------------|---------------------- `0.0.0 ..< 0.3.0` | 5.1 `0.3.0 ..< 0.4.0` | 5.2 `0.4.0 ..< 0.5.0` | 5.4 -`0.5.0 ...` | 5.5.2 +`0.5.0 ..< 0.6.2` | 5.5.2 +`0.6.2 ...` | 5.6 ## What does SwiftNIO SSH support? diff --git a/Sources/NIOSSH/Child Channels/SSHChannelData.swift b/Sources/NIOSSH/Child Channels/SSHChannelData.swift index 17d09ee..e449258 100644 --- a/Sources/NIOSSH/Child Channels/SSHChannelData.swift +++ b/Sources/NIOSSH/Child Channels/SSHChannelData.swift @@ -34,10 +34,8 @@ public struct SSHChannelData { extension SSHChannelData: Equatable {} -#if swift(>=5.6) @available(*, unavailable) extension SSHChannelData: Sendable {} -#endif extension SSHChannelData { /// The type of this channel data. Regular ``SSHChannelData/DataType/channel`` data is the standard type of data on an `SSHChannel`, diff --git a/Sources/NIOSSH/Docs.docc/index.md b/Sources/NIOSSH/Docs.docc/index.md index 36298b3..6382b22 100644 --- a/Sources/NIOSSH/Docs.docc/index.md +++ b/Sources/NIOSSH/Docs.docc/index.md @@ -12,14 +12,15 @@ There are a number of reasons to provide a programmatic SSH implementation. One Another good reason to provide programmatic SSH is that it is not uncommon for services to need to interact with other services in a way that involves running commands. While `Process` solves this for the local use-case, sometimes the commands that need to be invoked are remote. While `Process` could launch an `ssh` client as a sub-process in order to run this invocation, it can be substantially more straightforward to simply invoke SSH directly. This is [`libssh2`](https://www.libssh2.org)'s target use-case. SwiftNIO SSH provides the equivalent of the networking and cryptographic layer of libssh2, allowing motivated users to drive SSH sessions directly from within Swift services. -The most recent versions of SwiftNIO SSH support Swift 5.5.2 and newer. The minimum Swift version supported by SwiftNIO SSH releases are detailed below: +The most recent versions of SwiftNIO SSH support Swift 5.6 and newer. The minimum Swift version supported by SwiftNIO SSH releases are detailed below: SwiftNIO SSH | Minimum Swift Version ------------------|---------------------- `0.0.0 ..< 0.3.0` | 5.1 `0.3.0 ..< 0.4.0` | 5.2 `0.4.0 ..< 0.5.0` | 5.4 -`0.5.0 ...` | 5.5.2 +`0.5.0 ..< 0.6.2` | 5.5.2 +`0.6.2 ...` | 5.6 ### What does SwiftNIO SSH support? diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index 4e6902e..0000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,14 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -fatalError("Please use --enable-test-discovery to run the tests instead") diff --git a/docker/docker-compose.2004.55.yaml b/docker/docker-compose.2004.55.yaml deleted file mode 100644 index 8f5c476..0000000 --- a/docker/docker-compose.2004.55.yaml +++ /dev/null @@ -1,25 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: swift-nio-ssh:20.04-5.5 - build: - args: - ubuntu_version: "focal" - swift_version: "5.5" - - documentation-check: - image: swift-nio-ssh:20.04-5.5 - - test: - image: swift-nio-ssh:20.04-5.5 - environment: - - MAX_ALLOCS_ALLOWED_client_server_many_small_commands_per_connection=238900 - - MAX_ALLOCS_ALLOWED_client_server_one_command_per_connection=1098050 - - MAX_ALLOCS_ALLOWED_client_server_streaming_large_message_in_small_chunks=55100 - #- SANITIZER_ARG=--sanitize=thread - #- WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors - - shell: - image: swift-nio-ssh:20.04-5.5