30 Commits

Author SHA1 Message Date
Mads Odgaard c5784ca815 Replace import Foundation with FoundationEssentials (#897)
Replaces all the foundation imports.

One issue is that `HTTPClient.init?(httpsURLWithSocketPath socketPath:
String, uri: String = "/")` uses `addingPercentEncoding()` from
Foundation. So instead, we use a pure Swift impl. that does the same.

We also need to disable default traits from `swift-configuration` to
prevent linking Foundation, because the `JSON` trait does that.

This also adds a linkage test to prevent regressions to CI.
2026-03-13 13:23:14 +00:00
Rick Newton-Rogers 5ee3708ca5 remove contributors script (#782)
remove contributors script
2024-11-14 16:19:19 +00:00
Rick Newton-Rogers c621142327 Adopt GitHub actions (#780)
Migrate CI to use GitHub Actions.

### Motivation:

To migrate to GitHub actions and centralised infrastructure.

### Modifications:

Changes of note:
* Adopt swift-format using rules from SwiftNIO.
* Remove scripts and docker files which are no longer needed.
* Disabled warnings-as-errors on Swift 6.0 CI pipelines for now.

### Result:

Feature parity with old CI.
2024-10-29 15:01:46 +00:00
David Nadoba d62c475401 Drop Swift 5.5 (#686) 2023-04-14 17:05:09 +01:00
Cory Benfield 343cdf4639 Fix documentation and add support for CI-ing it (#679)
* Fix documentation and add support for CI-ing it

* Fixup license header
2023-04-11 13:35:46 +01:00
Cory Benfield 9cdc4290b8 Accept bare 2023 in license header (#676) 2023-04-03 17:07:02 +01:00
George Barnett b57bcb90a8 Raise minimum supported Swift version from 5.4 to 5.5 (#630)
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)
- Update tools version in Package@swift-5.5.swift to 5.5 (from 5.4)
- Add supported versions section to README

Results:

Minimum Swift version is 5.5
2022-09-28 17:16:26 +01:00
Cory Benfield 5e3e58dafd Use Docc for documentation (#613)
Motivation

Documentation is nice, and we can help support users by providing useful
clear docs.

Modifications

Add Docc to 5.6 and later builds
Make sure symbol references work
Add overview docs

Result

Nice rendering docs
2022-08-09 16:23:14 +01:00
Fabian Fett 13e93d4d43 Drop support for Swift 5.2 and 5.3 (#581)
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.

- drop support for Swift 5.2 and 5.3. 
- update CI for Swift 5.4 to run on bionic instead of focal to ensure that we still test bionic.
2022-04-21 08:50:42 +02:00
Franz Busch b1e4f1966a Use SPM API diff checker (#572)
### Motivation:

SPM has built in functionality to check the API of modules against a target git treeish. We can use this to simplify our `check_no_api_breakages.sh` script. Closes https://github.com/apple/swift-nio/issues/1239

### Modifications:

This PR, exchanges the direct calls to Swift's API checker with the new SPM `diagnose-api-breaking-changes` tool. This allows us to get rid of the manual module parsing, build invocations and result comparisons.

### Result:

We are now using SPMs `diagnose-api-breaking-changes` to check for breaking changes.
2022-03-28 09:59:34 +01:00
David Nadoba f3830d11ec Add async shutdown method to HTTPClient (#551) 2022-02-07 11:36:53 +01:00
tomer doron 6be8648db8 update doc generation script (#533)
- invoke source-kitten with the correct flags
- make location of source-kitten source checkout more robust
2021-12-20 17:09:44 +01:00
David Nadoba 9eaecbbbce SwiftFormat --ifdef no-indent (#494)
* SwiftFormat --ifdef no-indent

* update `generate_linux_tests.rb` to use new indention rule
2021-11-25 17:09:19 +01:00
David Nadoba e4e233a2b1 remove umbrella NIO imports and add soundness check (#446) 2021-09-29 17:42:42 +02:00
Fabian Fett 7c77ff64ac Fix doc generation and jazzy version (#414) 2021-09-03 11:14:45 +02:00
David Evans 92bcf49c96 Make Swift 5.2 the minimum required version (#378)
We're applying this change across all of the NIO family of projects.

I've removed the docker files for earlier versions, and set the tools version. I've also added a brief note inside the contributing guide.
2021-06-22 17:31:00 +01:00
Cory Benfield e4fded76ac Better backpressure management. (#352)
Motivation:

Users of the HTTPClientResponseDelegate expect that the event loop
futures returned from didReceiveHead and didReceiveBodyPart can be used
to exert backpressure. To be fair to them, they somewhat can. However,
the TaskHandler has a bit of a misunderstanding about how NIO
backpressure works, and does not correctly manage the buffer of inbound
data.

The result of this misunderstanding is that multiple calls to
didReceiveBodyPart and didReceiveHead can be outstanding at once. This
would likely lead to severe bugs in most delegates, as they do not
expect it.

We should make things work the way delegate implementers believe it
works.

Modifications:

- Added a buffer to the TaskHandler to avoid delivering data that the
   delegate is not ready for.
- Added a new "pending close" state that keeps track of a state where
   the TaskHandler has received .end but not yet delivered it to the
   delegate. This allows better error management.
- Added some more tests.
- Documented our backpressure commitments.

Result:

Better respect for backpressure.

Resolves #348
2021-03-30 11:39:35 +01:00
tomer doron bbebce3739 fix doc generation setup (#336) 2021-01-24 15:12:34 -08:00
Fabian Fett 9671de72fd Use welcoming language (#333) 2021-01-22 09:25:58 -08:00
Konrad `ktoso` Malawski 7ea9dd2b5f Adjust gen_docs script Default branch is main (#302) 2020-09-08 06:54:46 +01:00
tomer doron a794d30fd8 update docs generation script to work better with selinux (#173)
motivation: docs scripts is broken on selinux due to restriction on ssh-agent

changes:
* change the jazzy workspace to a directory accessible by the CI node so we can push from the agent instead of from the docker container
* dont remove older docs when pushing new ones
* add version information and source links
2020-02-28 12:58:47 -08:00
Johannes Weiss 726d0c62d1 sanity check: fix copyright year parsing (#142) 2019-12-11 11:55:33 +00:00
tomer doron 018e139eef update copyrights note (#125)
motivation: the Swift Server Workgroup is not a legal entity and cannot hold copyrights. with this change, code authors continue and retain their copyrights under the apache license and previous copyrights note, but Apple steps up instead of the workgroup which has no legal status

changes:
* update header files to say "Apple Inc. and the AsyncHTTPClient project authors" instead of "Swift Server Workgroup and the AsyncHTTPClient project authors"
* update validation scripts to check for the correct header
* add CONTRIBUTING.md file to explain how to make contributions and include a legal notice about licensing the contribution to Apple and the project
* regenerate CONTRIBUTORS.md to reflect most recent contributions
2019-11-06 11:20:30 -08:00
tomer doron cbe6a53755 check for api breakage and prepare to test with thread sanitizer in ci (#122)
motivation: better ci testing

changes:
* add api breakage script to test api breakage in ci
* add "shell" utility docker-compose task to run api breakage script
* change test task to treat warning as errors
* prepare to test with thread sanitizer in 5.1
2019-11-04 16:57:39 -08:00
tomer doron bab22d0ebd test formatting issues as part of sanity check (#73)
motivaiton: unified format

changes:
* fix outstanding formatting issues
* add a call to swiftformat as part of sanity script
* fix sanity script language check debugging statements
2019-07-30 10:00:10 +01:00
Artem Redkin 27fe9265b2 rename to async-http-client (#58) 2019-07-02 14:00:34 +03:00
Trevör 23dd98416b Replace 0.0.0 default docs version with master (#22)
This is a more correct way of versioning the docs and solves an issue
where some of doc links would lead to a 404 GitHub page
2019-04-30 17:18:39 -07:00
tomer doron 150216ea2b Add 'Show on GitHub' link to API docs (#17)
Motivation:

Allowing readers of the API documentation to drill into the implementation of documented declarations can be educational and helpful for debugging, among several other reasons.

Modifications:

Add --github-file-prefix appending the current version in order to keep stable links. This means that documentation generated from any non-release revision may resolve incorrectly. This can be refined in the doc generation script later if it is deemed problematic by resolving to the commit sha if it doesn't exactly align with the version.

Result:

Users will be able to click a 'Show on GitHub' for all documented API declarations.
2019-04-23 11:49:38 -07:00
tomer doron 4acd312a5a fix formatting (#12)
motivation: use consistent formatting

changes:
* run `swiftformat --self insert --patternlet inline --stripunusedargs unnamed-only --comments ignore` which is the standard formatting we use
* update generate_linux_tests to follow same formatting rules
2019-04-11 15:46:30 -07:00
tomer doron 9b01f9d9c1 add collateral (#7)
motivation: min requirements by sswg

changes:
* add code of conduct, contributors
* add docker setup for ci
* add linux docs generation and sanity check scripts
* add api documentation generation script
2019-04-10 16:07:35 -07:00