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. 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)