Commit Graph

13 Commits

Author SHA1 Message Date
Cory Benfield 61043a36f6
Work around the SwiftPM layout change. (#2389)
Motivation:

SwiftPM has changed its default layout for packages in
apple/swift-package-manager#6144. This breaks our CI, which assumes the
prior layout. We should work around this.

Modifications:

Enhance the code to tolerate both layouts.

Result:

Integration tests run on all platforms
2023-03-13 06:40:31 -07:00
David Nadoba 0b4edd8329
Add `NIOBSDSocket.ProtocolSubtype` (#2317)
* RawSocket prototype

* Conform `ProtocolSubtype` to `Hashable`

* Add public `NIOIPProtocol` type

Make `ProtocolSubtype` internal

* Subset of IANA protocols with an RFC

* Add `CustomStringConvertible` to `NIOIPProtocol`

* Add `init(_ rawValue: Int)`

* Rename `NIOBSDSocket.ProtocolSubtype.ip` to `.default`

* Add `NIOBSDSocket.ProtocolSubtype.mptcp`

and remove `NIOBSDSocket.mptcpProtocolSubtype`
2022-11-22 06:01:52 -08:00
George Barnett fcca969463
Raise minimum supported Swift version from 5.4 to 5.5 (#2267)
Motivation:

SwiftNIO periodically drops support for older Swift versions. Now that
5.7 has been released, 5.4 will be dropped.

Modifications:

- Remove 5.4 specific Package.swift and docker-compose
- Update the 5.7 docker-compose to use the released 5.7 and move from
  focal (2004) to jammy (2204)
- Remove unused swiftformat from Dockerfile
- Update tools version in syscall wrapper tests to 5.5
- Update docs

Results:

Minimum Swift version is 5.5
2022-09-29 11:47:44 +01:00
David Nadoba 4fb6bf135b
Adopt `Sendable` for `CircularBuffer`, `MarkedCircularBuffer` and types in `NIOBSDSocket` namespace (#2097)
* Adopt `Sendable` for types in `BSDSocket` namespace

* Adopt `Sendable` for `CircularBuffer` and `MarkedCircularBuffer`

and also `Endianness`

* move `NIOSendable` into its own file and copy it over to syscall integration tests
2022-05-06 12:34:31 +01:00
Fabian Fett dc8a317a24
Drop support for Swift 5.2 and 5.3 (#2080)
* Drop support for 5.2 and 5.3

As outlined in a [Swift forums post in November ’21](https://forums.swift.org/t/swiftnio-swift-version-support/53232), SwiftNIO will only support the latest non-patch Swift release and the 2 immediately prior non-patch versions.

In this commit we drop support for Swift 5.2 and 5.3. We update CI for Swift 5.4 to run on bionic instead of focal to ensure that we still test bionic.

* Added Versions paragraph to Security document

* Apply suggestions from code review

Co-authored-by: Cory Benfield <lukasa@apple.com>

Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-04-20 11:48:41 +01:00
Cory Benfield d68066ccd7
Remove unnecessary extra swift file. (#2062)
The nightly builders have started automatically adding a struct with
@main to packages generated using swift package init. This is
interfering with our syscallwrapper tests, so we should delete that
file.
2022-03-08 08:08:47 -08:00
Cory Benfield b05c6f2206
Move NIO to NIOPosix, make NIO a shell. (#1936)
Motivation:

The remaining NIO code really conceptually belongs in a module called
NIOPosix, and NIOCore should really be called NIO. We can't really do
that last step, but we can prepare by pushing the bulk of the remaining
code into a module called NIOPosix.

Modifications:

- Move NIO to NIOPosix
- Make NIO an umbrella module.

Result:

NIOPosix exists.
2021-08-16 16:50:40 +01:00
Cory Benfield 4bb6acf57d
Move SocketAddress and NIOBSDSocket to NIOCore (#1907)
Motivation:

This is the next stage of our move of common interchange objects to
NIOCore and out of the NIO module. This time around we need
SocketAddress, which is part of the Channel API. Sadly, SocketAddress is
not as clean as some of the other ports, because it leaks a number of
POSIX-y concepts. This also forces us to bring along NIOBSDSocket, which
ideally we would not move, but we foolishly exposed as API on
SocketAddress.

Modifications:

- Move NIOBSDSocket API components into NIOCore.
- Split out the internal abstractions for NIOBSDSocket and leave those
  in NIO.
- Move SocketAddress into NIOCore.

Result:

SocketAddress will be sitting in NIOCore.
2021-07-22 17:48:14 +01:00
Saleem Abdulrasool 5de1e41310
NIO: Implement BSD sockets APIs for Windows (#1471)
Motivation:

Split out the internal implied BSD socket API code to allow alternative implementations of these interfaces on other platforms.

Modifications:

- Split the code apart.
- Provide POSIX and Windows implementations of the BSD socket API.

Result:

Should be easier to run NIO unmodified on Windows.
2020-07-03 10:14:36 +01:00
Saleem Abdulrasool 37b48094ba
Add `BSDSocket.SocketType` to represent the socket type (#1467)
This adds a new enumeration which encapsulates the socket type values.
This enables ports to provide the same surface with a different name as
necessary.
2020-04-03 17:16:48 +01:00
Johannes Weiss 2bf296958b
switch swift-tools-version to 5.0 for integration tests (#1369)
Motivation:

Some integration tests still used swift-tools-version:4.0.

Modifications:

Make it 5.0

Result:

Run the compiler in a sensible mode.
2020-01-29 18:31:37 +00:00
Johannes Weiß 1065c9d38e
add license headers for shell scripts (#135)
Motivation:

Our shell scripts didn't have license headers but they should.

Modifications:

Add licensing headers to all shell scripts

Result:

Licensing clear for shell scripts too.
2018-03-12 17:12:47 +00:00
Johannes Weiß de0bc1ed83 fix integration tests on Darwin (#4)
Motivation:

The integration tests didn't work on Darwin anymore as the `CNIODarwin`
module wasn't included in their build.

Modifications:

Included the `CNIODarwin` module, just like `CNIOLinux`.

Result:

integration tests run on Darwin
2018-02-21 20:14:24 +01:00