Skip to content

Conversation

phausler
Copy link
Member

When updating to the latest language mode there are a ton of warnings that became errors around Swift Concurrency. This addresses all of the errors so far (and caught a subtile compiler bug for sendable types within the buffer algorithm).

This still has a few warnings around Sendable meta types.

e.g.

AsyncChunksOfCountOrSignalSequence.swift:169:33: warning: capture of non-Sendable type 'Collected.Type' in an isolated closure [#SendableMetatypes]
167 |     return Iterator(
168 |       iterator: merge(
169 |         chain(base.map { Either.element($0) }, [.terminal].async),
    |                                 `- warning: capture of non-Sendable type 'Collected.Type' in an isolated closure [#SendableMetatypes]
170 |         signal.map { _ in Either.signal }
171 |       ).makeAsyncIterator(),

These are relatively prolific but likely need to be addressed by restricting around a where clause requiring SendableMetatype https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes/

@phausler
Copy link
Member Author

The 5.9 break is kind-of expected with the 6.2 tools version; but that was just put in to verify the 6.2 language mode worked as expected - from my understanding that can be reverted back similarly to how the [email protected] works

Comment on lines -124 to +134
return try await storage.next()?._rethrowGet()
return try await storage.next().wrapped?._rethrowGet()
case .unbounded(let storage):
return try await storage.next()?._rethrowGet()
return try await storage.next().wrapped?._rethrowGet()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave a comment here why the unsafe transfer is needed and why it is sound?

@phausler
Copy link
Member Author

phausler commented Sep 8, 2025

5.9 is out of the scope of support for 1.1 so any 5.9 compilers must use the older releases; Windows Failures are an existing issue.

@phausler phausler merged commit 18e2398 into apple:main Sep 8, 2025
18 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants