diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47d21b7e2a..280f2b7a4f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,7 +67,21 @@ The default policy for taking contributions is “Squash and Merge” - because ### Make sure your patch works for all supported versions of swift -The CI will do this for you. You can use the docker-compose files included if you wish to check locally. Currently all versions of swift >= 5.7 are supported. For example usage of docker compose see the main [README](./README.md#an-alternative-using-docker-compose) +The CI will do this for you, but a project maintainer must kick it off for you. Currently all versions of Swift >= 5.8 are supported. + +If you wish to test this locally you have two options [act](https://github.com/nektos/act) and Docker Compose files. + +#### Act + +[Install act](https://nektosact.com/installation/) and then you can run the full suite of checks via: +``` +act pull_request +``` +Note that SwiftNIO matrix testing makes use of nightly builds, so you may want to make use of the ```--action-offline-mode``` to avoid repulling those. + +#### Docker Compose files + +You can use the docker-compose files. For example usage of Docker Compose see the main [README](./README.md#an-alternative-using-docker-compose) ### Make sure your code is performant @@ -77,7 +91,15 @@ SwiftNIO has been created to be high performance. The integration tests cover s Try to keep your lines less than 120 characters long so github can correctly display your changes. -It is intended SwiftNIO will use the swift-format tool in the future to bring consistency to code formatting. To follow the discussion on this topic see the swift evolution proposal [SE-250](https://github.com/apple/swift-evolution/blob/main/proposals/0250-swift-style-guide-and-formatter.md) +SwiftNIO uses the [swift-format](https://github.com/swiftlang/swift-format) tool to bring consistency to code formatting. There is a specific [.swift-format](./.swift-format) configuration file. This will be checked and enforced on PRs. Note that the check will run on the current most recent stable version target which may not match that in your own local development environment. + +If you want to apply the formatting to your local repo before you commit then you can either run [check-swift-format.sh](./scripts/check-swift-format.sh) which will use your current toolchain, or to match the CI checks exactly you can use `act` (see [act section](#act)): +``` +act --action-offline-mode --bind workflow_call -j format-check --input format_check_enabled=true +``` + +This will run the format checks, binding to your local checkout so the edits made are to your own source. + ### Extensibility diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index a5f3fe7d21..a8e9f41d7e 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -110,6 +110,7 @@ needs to be listed here. - Markus Kieselmann <markus@kieselmann.eu> - Marli Oshlack <marli.oshlack@apple.com> - Matt Eaton <agnosticdev@gmail.com> +- Matt Hope <matt_hope@apple.com> - Matteo Comisso <matteo.comisso@me.com> - Max Desiatov <m_desiatov@apple.com> - Max Desiatov <max@desiatov.com> diff --git a/README.md b/README.md index 39d2094975..18d566b61f 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,12 @@ Redis | ✅ | ❌ | [swift-server/RediStack](https://github.com/swift-server/Red This is the current version of SwiftNIO and will be supported for the foreseeable future. -The most recent versions of SwiftNIO support Swift 5.7 and newer. The minimum Swift version supported by SwiftNIO releases are detailed below: +### Swift Versions + +We commit to support the most recently released swift version (currently 5.10) and the last two minor releases before that unless this is impossible to do in one codebase. +In addition checks are run against the latest beta release (if any) as well as the nightly swift builds and the intent is that these should pass. + +The most recent versions of SwiftNIO support Swift 5.8 and newer. The minimum Swift version supported by SwiftNIO releases are detailed below: SwiftNIO | Minimum Swift Version --------------------|---------------------- @@ -106,7 +111,6 @@ In SwiftPM that can be easily done specifying for example `from: "2.0.0"` meanin SemVer and SwiftNIO's Public API guarantees should result in a working program without having to worry about testing every single version for compatibility. - ## Conceptual Overview SwiftNIO is fundamentally a low-level tool for building high-performance networking applications in Swift. It particularly targets those use-cases where using a "thread-per-connection" model of concurrency is inefficient or untenable. This is a common limitation when building servers that use a large number of relatively low-utilization connections, such as HTTP servers.