Modern Swift concurrency#2
Merged
Merged
Conversation
Adopt the Swift 6.2 Approachable Concurrency upcoming features (NonisolatedNonsendingByDefault and InferIsolatedConformances) across the library, test, and tool targets. The public async API keeps its existing signatures; under the new default, nonisolated async entry points run on the caller's executor. Mark the streaming line reader's async iterator next() @Concurrent so large-file and remote-stream parsing continues to run off the caller's executor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Document the adoption of the Approachable Concurrency upcoming features in the change log. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopt the Swift 6.2 Approachable Concurrency upcoming features
(
NonisolatedNonsendingByDefaultandInferIsolatedConformances) across thelibrary, test, and tool targets. SwiftDOF was already a clean Swift 6.2
structured-concurrency codebase (async/await, custom
AsyncSequencelinereaders, an actor for progress, Swift Testing), so there were no
GCD/threads/locks/
nonisolated(unsafe)/MainActor.run/@unchecked Sendable/@preconcurrencysites to migrate.The public async API keeps the same signatures and existing source compiles
unchanged. Under the new default, the execution domain of
nonisolatedasyncentry points (
init(url:),init(bytes:),from(url:)) follows the caller'sexecutor. The streaming byte line reader's async iterator
(
AsyncBytesLineReader.AsyncIterator.next()) is marked@concurrentsolarge-file and remote-stream parsing continues to run off the caller's executor
under the new default.
No public API signatures changed; this is a source-compatible behavioral
modernization.
Verification
swift build --build-testspasses.passed.
Version
New version: 1.1.0 (minor — source-compatible behavioral change to async
execution semantics). The GitHub release will be cut after this PR is merged.
🤖 Generated with Claude Code