From c25318a4b088d4a67fac560fb2dc0e1f616f2a87 Mon Sep 17 00:00:00 2001 From: Tim Morgan Date: Fri, 26 Jun 2026 23:46:57 -0700 Subject: [PATCH 1/2] Enable Approachable Concurrency upcoming features 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) --- Package.swift | 14 +++++++++++--- Sources/SwiftDOF/Parser/DOFLineReader.swift | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 3886a28..f5c825b 100644 --- a/Package.swift +++ b/Package.swift @@ -3,6 +3,11 @@ import PackageDescription +let approachableConcurrency: [SwiftSetting] = [ + .enableUpcomingFeature("NonisolatedNonsendingByDefault"), + .enableUpcomingFeature("InferIsolatedConformances") +] + let package = Package( name: "SwiftDOF", defaultLocalization: "en", @@ -25,11 +30,13 @@ let package = Package( // Targets can depend on other targets in this package and products from dependencies. .target( name: "SwiftDOF", - resources: [.process("Resources")] + resources: [.process("Resources")], + swiftSettings: approachableConcurrency ), .testTarget( name: "SwiftDOFTests", - dependencies: ["SwiftDOF"] + dependencies: ["SwiftDOF"], + swiftSettings: approachableConcurrency ) ], swiftLanguageModes: [.v5, .v6] @@ -44,7 +51,8 @@ let package = Package( .product(name: "ArgumentParser", package: "swift-argument-parser"), .product(name: "ZIPFoundation", package: "ZIPFoundation"), .product(name: "Progress", package: "Progress.swift") - ] + ], + swiftSettings: approachableConcurrency ) ) #endif diff --git a/Sources/SwiftDOF/Parser/DOFLineReader.swift b/Sources/SwiftDOF/Parser/DOFLineReader.swift index ce03783..511902b 100644 --- a/Sources/SwiftDOF/Parser/DOFLineReader.swift +++ b/Sources/SwiftDOF/Parser/DOFLineReader.swift @@ -171,6 +171,7 @@ where Source.Element == UInt8, Source: Sendable { lineBuffer.reserveCapacity(lineBufferCapacity) } + @concurrent mutating func next() async throws -> [UInt8]? { lineBuffer.removeAll(keepingCapacity: true) From 6803de4cad7288d30d6f9463216f1540f06fd738 Mon Sep 17 00:00:00 2001 From: Tim Morgan Date: Fri, 26 Jun 2026 23:47:30 -0700 Subject: [PATCH 2/2] Bump version to 1.1.0 Document the adoption of the Approachable Concurrency upcoming features in the change log. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 315f002..727f03b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [1.1.0] - 2026-06-26 + +### Changed + +- Adopt the Swift 6.2 Approachable Concurrency upcoming features (`NonisolatedNonsendingByDefault` and `InferIsolatedConformances`) across the library, test, and tool targets. The public async API keeps the same signatures and existing source compiles unchanged; the default execution domain of `nonisolated` async entry points (`init(url:)`, `init(bytes:)`, `from(url:)`) now follows the caller's executor. +- Mark the streaming byte line reader's async iterator (`AsyncBytesLineReader.AsyncIterator.next()`) `@concurrent` so large-file and remote-stream parsing continues to run off the caller's executor under the new default. + ## [1.0.0] - 2026-01-14 Initial release.