Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test tweaks for CI #201

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ jobs:
perl -pi -e 's%r26%ndk/27%' swift/stdlib/cmake/modules/AddSwiftStdlib.cmake
else
if [ ${{ matrix.version }} = 'devel' ]; then
git apply swift-android-foundation-devel.patch
perl -pi -e 's%r26%ndk/27%' swift/stdlib/cmake/modules/AddSwiftStdlib.cmake
fi
git apply swift-android-ci-except-release.patch swift-android-foundation-except-release.patch
Expand Down
21 changes: 0 additions & 21 deletions swift-android-foundation-devel.patch

This file was deleted.

53 changes: 0 additions & 53 deletions swift-nio-revert-async.patch
Original file line number Diff line number Diff line change
@@ -1,56 +1,3 @@
diff --git a/Sources/NIOCore/AsyncSequences/NIOAsyncWriter.swift b/Sources/NIOCore/AsyncSequences/NIOAsyncWriter.swift
index badc34f967..f232d518f9 100644
--- a/Sources/NIOCore/AsyncSequences/NIOAsyncWriter.swift
+++ b/Sources/NIOCore/AsyncSequences/NIOAsyncWriter.swift
@@ -1173,7 +1173,38 @@ extension NIOAsyncWriter {
delegate: delegate
)

- case .initial, .finished, .writerFinished:
+ case .writerFinished(
+ let isWritable,
+ let inDelegateOutcall,
+ var suspendedYields,
+ let cancelledYields,
+ let bufferedYieldIDs,
+ let delegate,
+ let error
+ ):
+ // We have a suspended yield at this point that hasn't been cancelled yet.
+ // It was buffered before we became finished, so we still have to deliver it.
+ // We need to store the yield now.
+
+ self._state = .modifying
+
+ let suspendedYield = SuspendedYield(
+ yieldID: yieldID,
+ continuation: continuation
+ )
+ suspendedYields.append(suspendedYield)
+
+ self._state = .writerFinished(
+ isWritable: isWritable,
+ inDelegateOutcall: inDelegateOutcall,
+ suspendedYields: suspendedYields,
+ cancelledYields: cancelledYields,
+ bufferedYieldIDs: bufferedYieldIDs,
+ delegate: delegate,
+ error: error
+ )
+
+ case .initial, .finished:
preconditionFailure("This should have already been handled by `yield()`")

case .modifying:
@@ -1501,7 +1532,7 @@ extension NIOAsyncWriter {

self._state = .writerFinished(
isWritable: isWritable,
- inDelegateOutcall: inDelegateOutcall,
+ inDelegateOutcall: false,
suspendedYields: .init(),
cancelledYields: cancelledYields,
bufferedYieldIDs: bufferedYieldIDs,
diff --git a/Tests/NIOCoreTests/AsyncSequences/NIOAsyncWriterTests.swift b/Tests/NIOCoreTests/AsyncSequences/NIOAsyncWriterTests.swift
index 31c680b8bf..4f15ac9af9 100644
--- a/Tests/NIOCoreTests/AsyncSequences/NIOAsyncWriterTests.swift
Expand Down
Loading