### Motivation:
We introduced a new configuration type in #3746 to make further
extensions to the server pipeline (#3745 for example) easier to
introduce.
The plan was to merge #3745 soon after #3746 was merged, because #3745
added a breaking change to the new config type.
However, #3745 needs some more consideration. We should therefore revert
the change in #3746 to unblock new releases from being made until we
come up with a better solution.
### Modifications:
A clean revert of PR #3746.
### Result:
Unblocks new releases.
### Motivation:
`NIOHTTP1.HTTPPipelineSetup` contains helper methods which add HTTP/1
client/server handlers to the provided channel pipeline.
Over time, we have had to duplicate these methods when introducing a new
configuration option in order to not break API.
As a result, there is now lots of duplication in
`NIOHTTP1.HTTPPipelineSetup` and introducing more configuration options
is very cumbersome. We should instead add a configuration type to solve
this problem.
### Modifications:
- Added new configuration types named
`NIOHTTPServerPipelineConfiguration`, and
`NIOHTTPServerPipelineSynchronousConfiguration`.
- Added a new pipeline setup helper method on `ChannelPipeline` and
`ChannelPipeline.SynchronousOperations` that requires the configuration
type as an argument.
- Deprecated all existing helper methods on `ChannelPipeline` and
`ChannelPipeline.SynchronousOperations`.
### Result:
Better API.
### Motivation
* Swift 6.4 has been released, so we should add it to our CI coverage.
### Modifications
* Update `apple/swift-nio/scripts/generate_matrix.sh`
* Update `apple/swift-nio/scripts/check-matrix-job.sh`
* Update reusable adopters of `swift_test_matrix.yml`
* Update end-user adopter workflows of `swift_test_matrix.yml`
* Add Swift 6.4 inputs to `macos_tests.yml` and `macos_benchmarks.yml`
* Add a 6.4 release job to `wasm_swift_sdk.yml`
* Enable the Windows 6.4 unit test job in `main.yml` and
`pull_request.yml`
* Copy benchmark thresholds from 6.3
### Result
* NIO runs Swift 6.4 CI, and downstream repositories can opt-in.
---
- Successful run (minus broken nightlies):
https://github.com/apple/swift-nio/actions/runs/36403423635?pr=3750
### Motivation
Decoders are state machines and state machines are a natural fit for
non-copyable types. Today `ByteToMessageDecoder` and
`NIOSingleStepByteToMessageDecoder` require their conformers to be
copyable.
While we are here we also want `NIOSingleStepByteToMessageDecoder` to be
able to declare a concrete error type, so that callers can handle decode
errors without going through an existential.
### Changes
- Make `ByteToMessageDecoder` and `NIOSingleStepByteToMessageDecoder`
`~Copyable`.
- Add an `associatedtype DecodeError: Error = any Error` to
`NIOSingleStepByteToMessageDecoder` and spell decode and decodeLast as
`throws(DecodeError)`. Decoders that don't declare it keep behaving
exactly as before.
- Allow `~Copyable` `ByteToMessageDecoder` in `ByteToMessageHandler`.
- Since `~Copyable` types cannot be type erased into an existential
before macOS 15, we have to work around the existing `CanDequeueWrites`
dance: instead of casting `self` to `CanDequeueWrites` in
`handlerAdded`, ByteToMessageHandler gains an optional
`deliverQueuedWrite` closure. It is formed in the constrained
`ChannelOutboundHandler.write`, the only place where `Decoder`'s
`WriteObservingByteToMessageDecoder` conformance is statically known,
the first time a write arrives re-entrantly.
This has to be a closure rather than a protocol requirement on
`ByteToMessageDecoder`. `Decoders` may conform to
`WriteObservingByteToMessageDecoder` conditionally while conforming to
`ByteToMessageDecoder` unconditionally — `HTTPDecoder` does exactly this
— and all generic instantiations share one `ByteToMessageDecoder`
witness table, so such a requirement could only ever be witnessed by a
non-observing default and the write would be silently dropped.
- Split the delivery out of `tryDecodeWrites` into an `@inline(never)
dequeueWrites()`. `decodeLoop` calls `tryDecodeWrites` on every
iteration, so the empty-queue check has to stay cheap; keeping the
delivery inline tripled that function's size (50 → 141 instructions) and
showed up directly on the normal decode path.
- `ByteToMessageDecoderVerifier` allows `~Copyable`
`ByteToMessageDecoder`s.
- Added tests that use the newly lifted `~Copyable` restriction, plus
regression coverage for a decoder whose write-observing conformance is
conditional (the HTTPDecoder shape) and for constructing the handler in
a generic context.
### Result
Decoders may be non-copyable and may declare a concrete error type.
The normal decode path does not change performance. The re-entrant write
path costs one extra allocation per handler, but is meaningfully cheaper
in instructions. I'm happy to provide the benchmarks used to generate
those numbers in a separate pr – leaving them out here, as we would end
up with as many benchmarks as we have unit tests sooner or later.
Instructions, macOS arm64, per 1000 iterations, min of 5 interleaved
rounds:
```
┌──────────────────────────────┬────────────┬────────────┬───────────────────────────────────┐
│ │ main │ this PR │ │
├──────────────────────────────┼────────────┼────────────┼───────────────────────────────────┤
│ decode, no write observation │ 9,404,415 │ 9,360,896 │ −0.46% (noise ~0.8%, i.e. parity) │
├──────────────────────────────┼────────────┼────────────┼───────────────────────────────────┤
│ decode + re-entrant write │ 13,656,063 │ 12,541,951 │ −8.16% │
├──────────────────────────────┼────────────┼────────────┼───────────────────────────────────┤
│ handler add / remove │ 85,983,231 │ 83,361,791 │ −3.05% (noise ~2.2%) │
└──────────────────────────────┴────────────┴────────────┴───────────────────────────────────┘
```
Replacing the CanDequeueWrites existential with the closure is what
improves the reentrant write path: delivering a queued write is now a
direct closure call rather than a witness-table dispatch, and
handlerAdded no longer performs a runtime conditional-conformance
lookup.
The saving grows with the number of writes queued per decode — around
−16% with 8 queued writes, though that benchmark is noisier.
Allocations (nio-alloc-counter-tests, Swift 6.2):
```
┌────────────────────────────┬─────────┬─────────┬────────┐
│ │ main │ this PR │ │
├────────────────────────────┼─────────┼─────────┼────────┤
│ 1000_reqs_1_conn │ 27,341 │ 27,342 │ +1 │
├────────────────────────────┼─────────┼─────────┼────────┤
│ 1_reqs_1000_conn │ 368,000 │ 369,000 │ +1,000 │
├────────────────────────────┼─────────┼─────────┼────────┤
│ ping_pong_1000_reqs_1_conn │ 296 │ 296 │ — │
├────────────────────────────┼─────────┼─────────┼────────┤
│ decode_1000_ws_frames │ 2,000 │ 2,000 │ — │
└────────────────────────────┴─────────┴─────────┴────────┘
```
Forming the closure captures Decoder.OutboundIn's metadata, so it
allocates once per handler that actually queues a re-entrant write —
1_reqs_1000_conn builds 1000 such handlers, hence +1000. main's
existential cast did not allocate, so this is a new cost rather than
staying flat. The 1_reqs_1000_conn threshold is raised by 1000 for
6.1/6.2/6.3; the nightly toolchains are unchanged (10,000 on both — they
specialize the closure away entirely).
---------
Co-authored-by: Cory Benfield <lukasa@apple.com>
### Motivation:
Some CI is red that doesn't need to be red.
### Modifications:
- Update the nightly next thresholds for the integration tests – only
improvements.
### Result:
- Green CI for nightly next integration tests
For small fixed-size allocations, we can use stack instead of heap.
### Motivation:
Allocations are costly. Stack allocations are much cheaper than heap
allocations.
### Modifications:
Use `withUnsafeTemporaryAllocation(of:capacity:_:)` instead of
allocating an `Array`.
`withUnsafeTemporaryAllocation` allocates on the stack for up to 1000
bytes.
### Result:
Better performance.
### Motivation:
The old NIOCrashTester doesn't work on Windows and would be hard to
port. Also, Swift Testing has wonderful 'exit test' ability, let's use
that!
### Modifications:
- Rewrite all NIOCrashTester tests in Swift Testing
### Result:
- Less code to maintain
- (hopefully) works on Windows
- fixes#3657
Strip Transfer-Encoding when Content-Length is present in HTTPEncoder
### Motivation
When `correctlyFrameTransportHeaders()` detected a `Content-Length`
header, it returned `.contentLength` without removing any existing
`Transfer-Encoding` header.
### Changes
- Remove `Transfer-Encoding` header, if a `Content-Length` header is
present
### Result
NIO sends either a `Content-Length` header or a `Transfer-Encoding`
header, but not both.
Motivation:
Swift 6.0 is no longer supported, we should bump the tools version and
remove it from our CI.
Modifications:
* Bump the Swift tools version to Swift 6.1
* Remove Swift 6.0 jobs where appropriate in main.yml, pull_request.yml
* Set language mode 5 in Benchmarks package manifest
Result:
Code reflects our support window.
---------
Co-authored-by: George Barnett <gbarnett@apple.com>
### Motivation
* Swift 6.3 has been released, we should add it to our CI coverage.
### Modifications
* Update `apple/swift-nio/scripts/generate_matrix.sh`
* Update `apple/swift-nio/scripts/check-matrix-job.sh`
* Update reusable adopters of `swift_test_matrix.yml`
* Update end-user adopter workflows of `swift_test_matrix.yml`
* Remove stale `NIGHTLY_6_1` fallback shims from `generate_matrix.sh`
* Migrate `linux_nightly_6_1_arguments_override` to
`linux_nightly_next_arguments_override` in `main.yml` and
`pull_request.yml`
* Copy benchmark thresholds from 6.2
### Result
* NIO tests against Swift 6.3 in CI and downstream repositories can
opt-in.
* A successful run using the new Swift 6.3 jobs:
https://github.com/apple/swift-nio/actions/runs/23841350537/job/69497505715?pr=3565
### Motivation
`testCopyFileReplacingExistingFileSucceeds` (and
`testCopySymlinkReplacingExistingSymlinkSucceeds`) verify that no .tmp-
prefixed files are left behind after a `copyItem(replaceExisting: true)`
call on Linux. However, both tests create their files in the shared
system temp directory (e.g. /tmp) and then scan that entire directory
for .tmp- files. When other tests run in parallel, their in-flight
`copyItem(replaceExisting: true)` operations leave transient .tmp- files
in the same directory, causing spurious failures.
### Changes
- Both tests now create a dedicated subdirectory for their files, so the
temp file scan only sees files belonging to that specific test.
- Cleanup is handled via `addTeardownBlock` to ensure the subdirectory
is removed even if the test fails early.
### Results
The temp file assertions are no longer affected by concurrent test
activity or other processes writing to the shared temp directory,
eliminating the flakiness.
Let's improve NIOAsyncChannels performance, by using UnsafeContinuations
instead of CheckedContinuations.
### Motivation:
We want to improve the performance for our async APIs.
### Modifications:
- Introduce a new typealias `NIOUnsafeContinuation` that behaves like a
UnsafeContinuation in release mode and like a CheckedContinuation in
debug mode.
- Use the `NIOUnsafeContinuation` inside the `NIOAsyncWriter`
- Use the `NIOUnsafeContinuation` inside the
`NIOThrowingAsyncSequenceProducer`
### Result:
Fewer allocations
Add parallel execution mode for integration tests
### Motivation:
Integration tests regularly take 21m in CI; they're the long pole.
### Modifications:
* Allocation count tests are now run in parallel if
`NIO_ALLOC_COUNTER_TESTS_PARALLEL` is `true`, tests in a given file
are still in serial.
* Test output is catted to different files and recovered and printed in
the order in which the tests were started.
### Result:
Integration test execution (and therefore a PR's CI checks) goes from
21m to 10m
We have a number of copies of `UnsafeTransfer` and two copies of
`UnsafeMutableTransferBox` in our code base. Before introducing more of
those, lets centralize to just one using a `package` access modifier.
### Motivation:
Channels based on `BaseSocketChannel` throw in both `getOption` and
`setOption` if the channel has been closed, since the `setsockopt` will
fail. However, the current behavior of `EmbeddedChannel` is options
remain writable and readable on closed channels.
There are situations where we'd like to be able to model the runtime
behaviour of the real channel in tests, e.g. to test this fix:
https://github.com/apple/swift-nio-extras/pull/304.
### Modifications:
- Add API to enable throwing in `EmbeddedChannel.getOption` and
`.setOption` if channel is closed.
- Add a test for this new behavior.
### Result:
- New API to enable throwing in `EmbeddedChannel.getOption` and
`.setOption` if channel is closed.
- No observable change for existing users of `EmbeddedChannel`.
### Motivation:
From
https://github.com/apple/swift-nio/actions/runs/20197120190/job/57982705638
onwards, the Integration Test benchmark runs have been failing for
`Linux (nightly-main)` due to allocations for seven tests falling below
the defined thresholds.
### Modifications:
Updated thresholds for the tests where the number of allocations were
out-of-threshold (seven in total).
### Result:
The Integration Test run for `Linux (nightly-main)` no longer fails.
### Motivation:
`NIOAsyncTestingChannel` stored its `localAddress` and `remoteAddress`
in a locked storage on itself for thread safety, however in doing so
left us open to bugs because a handler grabbing the addresses of the
context had no visibility of the values.
### Modifications:
Reach into `EmbeddedChannelCore` for the addresses instead of storing
them on the `NIOAsyncTestinghannel`. I also considered a delegate
approach where the `EmbeddedChannelCore` could offload the
responsibility for storing the values back to the
`NIOAsyncTestingChannel` but it was complicated and of questionable
value.
### Result:
* The correct address values are seen no matter how they are obtained.
* We probably take a performance hit locking the values in this way but
this is testing code so probably not the end of the world.
Motivation:
The compiler is better at optimising closures wrapped in nominal types
than raw closures when used as generic parameters. CallbackList is used
a lot and stores an optional closure as well as on optional array of
closures. Wrapping these internally should save some allocations.
Modifications:
- Wrap the element stored in the `CallbackList`.
Result:
Fewer allocs
---------
Co-authored-by: Cory Benfield <lukasa@apple.com>
Motivation
With the introduction of isolated conformances, it has become necessary
to start managing the use of metatypes for some of our protocols. In
general, we don't want to force the relevant protocols to only be
conformed in non-isolated forms. Instead, we just want to make the
specific APIs non-usable.
Modifications
- Add shims for SendableMetatype that only use it when it is available.
- Require SendableMetatype where needed, gated by @preconcurrency.
Result
We continue to be safe.
Motivation:
Swift 5.9 is no longer supported, we should bump the tools version and
remove it from our CI.
Modifications:
* Bump the Swift tools version to Swift 5.10
* Remove Swift 5.9 jobs where appropriate in main.yml, pull_request.yml
Result:
Code reflects our support window.
Add and enable Swift 6.1 workflows
### Motivation:
Swift 6.1 has been released, we should add it to our CI coverage.
### Modifications:
* Update `appe/swift-nio/scripts/generate_matrix.sh`
* Update reusable adopters of `swift_test_matrix.yml`
* Update end-user adopter workflows of `swift_test_matrix.yml`
* Copy over test flags from Swift 6.0 jobs
### Result:
NIO tests against Swift 6.1 in CI and downstream repositories can
opt-in.
(Successful CI run with the workflows modified to use the changes on
this branch
https://github.com/apple/swift-nio/actions/runs/14400598096?pr=3196)
Following on from https://github.com/apple/swift-nio/pull/3126 delete
`Benchmarks/Thresholds/nightly-6.1` and
`IntegrationTests/tests_04_performance/Thresholds/nightly-6.1.json`
which is no longer needed now that the shared benchmarks workflow has
been updated.
Use nightly_next as swift version
see https://github.com/apple/swift-nio/pull/3122
Motivation:
To not have to rename threshold directories when the nightly branch
changes.
Modifications:
* Use nightly_next as swift version in the matrix generation script
which
is picked up by the benchmark script.
* Move nightly-next thresholds and add legacy symlink
Result:
Benchmark thresholds will attempt to find directories named
nightly_next, not nightly_6_1.
Motivation:
As pointed out in #3071, the `flatScheduleTask` implementations can be
improved.
Modifications:
- Refactor the `flatScheduleTask` implementations to skip `flatMap`
calls, which avoids creating an extra promise.
- As there is now a lower number of allocations, reduce the necessary
thresholds for the allocation tests.
Result:
Reduction in the number of allocations in the package.
---------
Co-authored-by: George Barnett <gbarnett@apple.com>
### Motivation:
Some changes were missed in #3076, passing through parameters for the
new 6.1 version.
### Modifications:
Pass through more parameters, clean up misleading comments.
### Result:
6.1 nightly runs will be more like 6.0 nightly runs were
Motivation:
Users of SelectableEventLoop deserve to have their code that uses the
isolated event loop view perform at least as well as the code that
doesn't.
Modifications:
- Adopt the extra protocol witnesses.
- Refactor out common code.
Result:
Better performance
---------
Co-authored-by: George Barnett <gbarnett@apple.com>
### Motivation:
As outlined in this
[issue](https://github.com/apple/swift-nio/issues/2930) by @weissi, the
current performance of calling `description` on `HTTPHeaders` is
undermined by the dynamism of Array.
### Modifications:
The proposed solution replaces the implementation of `description` to
iterate over the items and print them out manually. This provides a
faster solution since we bypass the cost of calling into `description`
of an Array.
### Result:
A more performant implementation of `HTTPHeaders` description.
---------
Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
Co-authored-by: Cory Benfield <lukasa@apple.com>
Motivation
Right now the isolated view on the EventLoop has to implement its
interface in terms of UnsafeTransfer, because there are no non-Sendable
operations it can use.
That hurts us because we have to allocate an extra closure for all these
operations, making them slower than they need to be. This is unavoidable
in some contexts, but most EventLoops would be able to offer a fast-path
that avoids this extra allocation.
To achieve that, we need to move this logic into a customisation point
on the EventLoop protocol. Our fallback default implementation can be
the same as we do today.
Modifications
- Add customisation points for EventLoop for each of its operations that
has a protocol witness already.
- Add default implementations of these, using the implementation from
EventLoop.Isolated.
Results
No behavioural changes, but the code has moved.
---------
Co-authored-by: George Barnett <gbarnett@apple.com>
Motivation:
As with the ELF operations before them, the isolated EL operations
currently incur overhead above-and-beyond the overhead of their
non-isolated counterparts. That's not what we want to see. However,
before we "fix" them, we need to add regression testing to confirm our
fix actually worked.
Modifications:
- Add isolated variations of all current EL scheduling tests.
- Where isolated methods didn't have alloc counter tests, add new ones
for the non-isolated versions too.
Result:
More tests.
### Motivation:
The bootstraps are the next most obvious target for cleaning up
Sendability issues. These issues are mostly just missing annotations,
but there are a few places where we had actual latent threading bugs
that were missed. A lot more of the control flow is made more explicit
in this patch, and in general it should get a lot easier to be confident
that the code is correct.
### Modifications:
- Add necessary `@Sendable` annotations
- Clean up some incorrect `self` captures of bootstraps, which are not
`Sendable`, and which could lead to real threading bugs
- Make a few methods `static` to avoid needing to capture `self` at all.
- Make a few threading assumptions clear by using the isolated views or
the sync operations
- Add some missing `Sendable` constraints on interior generic functions.
### Result:
Better safety, better correctness in the bootstraps.
Motivation:
Unfortunately, closure composition is really expensive: closures that
capture closures always heap allocate. To make ELF.Isolated perform
well, then, we need to inline the method bodies directly.
Modifications:
- Add some isolated functions into ELF for enqueueing callbacks.
- Inline the implementation of the ELF methods into the isolated view.
Result:
Allocation counts match between isolated/nonisolated.
Motivation:
We've added isolated views onto EventLoopFutures. These are great, but
as initially implemented they add a bunch of overhead to the nonisolated
versions. That's not optimal, but before we change the code we should
make sure we have a benchmark baseline.
Modifications:
- Extend the test_future_lots_of_callbacks alloc test to add all the
callbacks that the isolated views have.
- Duplicate that test to one that adds isolated wrappers so we can
compare.
Result:
Two regression tests whose allocation counts should be equal, but
aren't.
Motivation:
NIOEmbedded is used all over NIO-land for testing various pieces of the
infrastructure, and so requires a substantial audit for strict
concurrency.
Modifications:
- Mark a few things Sendable.
- Fix the tests, which actually did have some nasty bugs
Result:
Sendable-clean NIOEmbedded
Motivation:
When converting an Array that holds existentials, it is necessary for
Swift to allocate a new Array and copy the elements into it, so that it
can fix up their existential boxes. We forced this to happen with taking
a `[ChannelHandler]` to `[ChannelHandler & Sendable]`, without rewriting
the other functions.
The result of that was that the other functions needed to convert the
channel handler types, causing extra allocations in this path.
Modifications:
Propagate the constraint down to the point where we iterate the Array.
Result:
Allocations reduced.
Motivation:
Unfortunately the current script has a bug meaning it can never fail.
Modifications:
Change bracketing for output search.
Result:
Allocation tests will flag when failing
Motivation:
Since Swift 5.5 and [SE-0299](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0299-extend-generic-static-member-lookup.md) it is possible to add static members to protocols which are discoverable through the shorthand dot syntax.
This change reduces type repetition and improves call-site legibility.
Modifications:
Added extensions for ChannelOption with static members where Self is bound to a concrete type.
Result:
ChannelOption types can be used with the leading dot syntax. For eg:
```
//before
.channelOption(ChannelOptions.explicitCongestionNotification, value: true)
.channelOption(ChannelOptions.socketOption(.so_reuseaddr), value: 1)
//after
.channelOption(.explicitCongestionNotification, value: true)
.channelOption(.socketOption(.so_reuseaddr), value: 1)
```
# Motivation
We have quite a lot of shell scripts in our repo and want to make sure that they all pass `shellcheck`.
# Modification
This PR adds a GH action workflow to the soundness script for `shellcheck` and fixes up all errors and warnings.
# Result
No more shell/bash discussions
### Motivation:
The two testing event loops—`EmbeddedEventLoop` and `NIOAsyncTestingEventLoop`—have different semantics for outstanding work during shutdown, which are both different from the production `SelectableEventLoop`, specifically with newly scheduled tasks that result from running existing scheduled work at the time of shutdown.
There are three axes to consider:
1. Scheduled tasks that are at or past their deadline.
2. Scheduled tasks with a deadline in the future.
3. Newly scheduled work that result from either running or cancelling (1) and (2).
| | (1) | (2) | (3) |
|-|-|-|-|
| `SelectableEventLoop` | Run | Cancel | Quiesce over 1000 ticks, repeatedly run resulting (1) and cancel resulting (2) |
| `EmbeddedEventLoop` | Run | Cancel | Cancel resulting (1) and resulting (2) |
| `NIOAsyncTestingEventLoop` | Run | Run | Run resulting (1) and resulting (2) |
Note that `NIOAsyncTestingEventLoop` may never terminate because of this.
### Modifications:
This PR aligns `EmbeddedEventLoop` and `NIOTestingEventLoop` and makes them more similar to `SelectableEventLoop` and less surprising semantics.
### Result:
| | (1) | (2) | (3) |
|-|-|-|-|
| `SelectableEventLoop` | Run | Cancel | Quiesce over 1000 ticks, repeatedly run resulting (1) and cancel resulting (2) |
| `EmbeddedEventLoop` | Run | Cancel | Cancel resulting (1) and resulting (2) |
| `NIOAsyncTestingEventLoop` | Run | Cancel | Cancel resulting (1) and resulting (2) |
### Future work:
Given both the `EmbeddedEventLoop` and `NIOAsyncTestingEventLoop` are used in tests of NIO applications that run with `SelectableEventLoop` in production, it might be worth extending both to also support quiescing to give a more representative shutdown behaviour in tests.
* Apply formatting
* Apply no block comments rule
* Apply OmitExplicitReturns
* Apple OnlyOneTrailingClosureArgument
* Apply NoAssignmentInExpressions
* Fix up DontRepeatTypeInStaticProperties lint errors
* Apply `OrderedImports`
* Apply `ReplaceForEachWithForLoop`
* format file
* Enable the formatting pipeline
* Adopt `AmbiguousTrailingClosureOverload`
* Fix license header
* Fix format check
* Fix `EndOfLineComment`
* Fix CI
* Adapt CI script to check if changes when running formatting
* Separate lint and format into to steps
* Fix format
* Adopt `UseEarlyExits`
* Revert "Adopt `UseEarlyExits`"
This reverts commit d1ac5bbe12.
Motivation:
The Swift 6 compiler emits a number of warnings about sendability which
we haven't dealt with yet. The CI failing on warnings may mask other
compilation issues or test failures.
Modifications:
- Disable warnings as errors on Swift 6 and main
Result:
Swift 6 and main CI should pass
# Motivation
Another reusable check is to make sure that all library products of a package are successfully building when consumed from a module that has Cxx interoperability enabled. Another check that's missing is running the integration tests.
# Modification
This PR adds two new checks to the reusable workflow. One to check for Cxx interoperability compatibility and another one to run the integration tests. I also fixed a misalgined name for the nightly benchmarks.
# Result
This should be one of the last reusable workflow checks.
* [GHA] Unacceptable language check
# Motivation
Next up replacing part of our soundness script that checked for unacceptable language.
# Modification
This PR adds a new GH action that checks for unacceptable language.
# Result
One more script replaced
* PR review
* Change homepage link to repo
Motivation:
Allocation counters are broken on macOS as described [here](https://github.com/apple/swift-nio/issues/2672). This PR fixes it.
Modifications:
`AtomicCounter` library is made `.dynamic`. This deduplicates the two (static) copies that used to exist. One embedded in the main binary, and the other in `HookedFunctions` dylib. This deplication fixes the issue, because there is just one copy of the counters in the process address space.
Result:
All the tests counting allocations and related statistics work on macOS.
* Update swift-tools-version to 5.7 in integration tests
* Fix flaky test
* Add missing AtomicCounter dependency in generated Package.swift
* Update swift-tools-version in integration test helper Swift projects
* Make test clearer
* Don't run MTELG integration test on Swift 5.11+
It hasn't been properly tested