Skip to content

Commit

Permalink
Drop Swift 5.5 (#197)
Browse files Browse the repository at this point in the history
Motivation

Per SwiftNIO's formal version policy, we are ready to drop support for
Swift 5.5.

Modifications

This patch removes the support for 5.5 and all supporting
infrastructure. This includes the test generation functionality, which
is no longer required, as well as the files generated by that
functionality. It updates the dockerfile for 5.8, and it removes all
conditional compilation checks that are now definitionally true.

Result

A nice, clean, 5.6+ codebase
  • Loading branch information
Lukasa authored Apr 13, 2023
1 parent 78d6cc4 commit 9cdb93e
Show file tree
Hide file tree
Showing 53 changed files with 4 additions and 1,826 deletions.
138 changes: 0 additions & 138 deletions [email protected]

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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.30.0 or better.
- Swift 5.5.2
- Swift 5.6
- `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`:
Expand All @@ -25,14 +25,15 @@ To depend on `swift-nio-extras`, put the following in the `dependencies` of your

### Support for older Swift versions

The most recent versions of SwiftNIO Extras support Swift 5.5.2 and newer. The minimum Swift version supported by SwiftNIO Extras releases are detailed below:
The most recent versions of SwiftNIO Extras support Swift 5.6 and newer. The minimum Swift version supported by SwiftNIO Extras releases are detailed below:

SwiftNIO Extras | Minimum Swift Version
--------------------|----------------------
`1.0.0 ..< 1.10.0` | 5.0
`1.10.0 ..< 1.11.0` | 5.2
`1.11.0 ..< 1.14.0` | 5.4
`1.14.0 ...` | 5.5.2
`1.14.0 ..< 1.19.1` | 5.5.2
`1.19.0 ...` | 5.6

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.

Expand Down
2 changes: 0 additions & 2 deletions Sources/NIOExtras/DebugInboundEventsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,5 @@ public class DebugInboundEventsHandler: ChannelInboundHandler {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension DebugInboundEventsHandler: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/DebugOutboundEventsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,5 @@ public class DebugOutboundEventsHandler: ChannelOutboundHandler {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension DebugOutboundEventsHandler: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/FixedLengthFrameDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,5 @@ public final class FixedLengthFrameDecoder: ByteToMessageDecoder {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension FixedLengthFrameDecoder: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/JSONRPCFraming+ContentLengthHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,8 @@ extension String {



#if swift(>=5.6)
@available(*, unavailable)
extension NIOJSONRPCFraming.ContentLengthHeaderFrameDecoder: Sendable {}

@available(*, unavailable)
extension NIOJSONRPCFraming.ContentLengthHeaderFrameEncoder: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/LengthFieldBasedFrameDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,5 @@ public final class LengthFieldBasedFrameDecoder: ByteToMessageDecoder {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension LengthFieldBasedFrameDecoder: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/LengthFieldPrepender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,5 @@ public final class LengthFieldPrepender: ChannelOutboundHandler {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension LengthFieldPrepender: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/LineBasedFrameDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,5 @@ public class LineBasedFrameDecoder: ByteToMessageDecoder {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension LineBasedFrameDecoder: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/PCAPRingBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,5 @@ public class NIOPCAPRingBuffer {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension NIOPCAPRingBuffer: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/RequestResponseHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,5 @@ public final class RequestResponseHandler<Request, Response>: ChannelDuplexHandl
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension RequestResponseHandler: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOExtras/WritePCAPHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,8 @@ public class NIOWritePCAPHandler: RemovableChannelHandler {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension NIOWritePCAPHandler: Sendable {}
#endif

extension NIOWritePCAPHandler: ChannelDuplexHandler {
public typealias InboundIn = ByteBuffer
Expand Down
2 changes: 0 additions & 2 deletions Sources/NIOHTTPCompression/HTTPRequestCompressor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,5 @@ public final class NIOHTTPRequestCompressor: ChannelOutboundHandler, RemovableCh
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension NIOHTTPRequestCompressor: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOHTTPCompression/HTTPRequestDecompressor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,5 @@ public final class NIOHTTPRequestDecompressor: ChannelDuplexHandler, RemovableCh
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension NIOHTTPRequestDecompressor: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOHTTPCompression/HTTPResponseCompressor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,8 @@ public final class HTTPResponseCompressor: ChannelDuplexHandler, RemovableChanne
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension HTTPResponseCompressor: Sendable {}
#endif

/// A buffer object that allows us to keep track of how much of a HTTP response we've seen before
/// a flush.
Expand Down
2 changes: 0 additions & 2 deletions Sources/NIOHTTPCompression/HTTPResponseDecompressor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,5 @@ public final class NIOHTTPResponseDecompressor: ChannelDuplexHandler, RemovableC
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension NIOHTTPResponseDecompressor: Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOSOCKS/Channel Handlers/SOCKSClientHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ public final class SOCKSClientHandler: ChannelDuplexHandler {
}
}

#if swift(>=5.6)
@available(*, unavailable)
extension SOCKSClientHandler: Sendable {}
#endif

extension SOCKSClientHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,5 @@ public final class SOCKSServerHandshakeHandler: ChannelDuplexHandler, RemovableC

}

#if swift(>=5.6)
@available(*, unavailable)
extension SOCKSServerHandshakeHandler: Sendable {}
#endif
75 changes: 0 additions & 75 deletions Tests/LinuxMain.swift

This file was deleted.

Loading

0 comments on commit 9cdb93e

Please sign in to comment.