Skip to content

Modern Swift concurrency#19

Merged
RISCfuture merged 2 commits into
mainfrom
modern-concurrency
Jun 27, 2026
Merged

Modern Swift concurrency#19
RISCfuture merged 2 commits into
mainfrom
modern-concurrency

Conversation

@RISCfuture

Copy link
Copy Markdown
Owner

Summary

Adopts Swift's Approachable Concurrency upcoming-feature flags and finishes
the package's move to modern structured concurrency.

  • Enables NonisolatedNonsendingByDefault and InferIsolatedConformances
    across every target, aligning the package's async execution semantics with
    modern Swift 6 defaults.
  • Drops the now-redundant @preconcurrency qualifier from all
    import RegexBuilder lines. Sendability of the cached, actor-confined
    compiled regexes is still carried by the package's existing
    Regex: @retroactive @unchecked Sendable conformance (now with an
    explanatory comment), which is retained until the standard library conforms
    Regex to Sendable itself.

SwiftMETAR was already a modern structured-concurrency codebase: it uses
parsing actors, async/await entry points, and AsyncStream producers.
There was no GCD, no DispatchSemaphore/DispatchGroup, no MainActor.run/
assumeIsolated, no nonisolated(unsafe), and no continuation-wrapped
callbacks to unwind.

Public API

No change. Entry points remain
static func from(string:on:lenientRemarks:) async throws -> Self
(METAR/TAF/WindsAloft) and
static func from(xml:) -> AsyncStream<XMLParseResult<Self>> (METAR/TAF).
The async parsers and AsyncStream producers are observably identical for
callers; only an internal import qualifier was removed and an internal
retroactive Sendable conformance was kept.

Verification

  • swift build --build-tests succeeds cleanly.
  • Unit tests pass (225/225).
  • swift format produced no further changes and swiftlint is clean on the
    changed files.

Version

This is a MINOR release: 3.1.0. The bump reflects a module-wide
modernization of async execution semantics with no source-breaking public
API change. The GitHub release will be cut after this PR is merged.

🤖 Generated with Claude Code

RISCfuture and others added 2 commits June 26, 2026 23:46
…rrency

Enable the NonisolatedNonsendingByDefault and InferIsolatedConformances
upcoming features across every target, bringing the package's async
execution semantics in line with modern Swift 6 defaults.

Drop the redundant @preconcurrency qualifier from all `import RegexBuilder`
lines. Sendability of the cached, actor-confined compiled regexes is carried
by the existing `Regex: @retroactive @unchecked Sendable` conformance, which
is retained (now with an explanatory comment) until the standard library
conforms `Regex` to `Sendable` itself.

No legacy concurrency remained to unwind: there was no GCD, no
DispatchSemaphore/DispatchGroup, no MainActor.run/assumeIsolated, no
nonisolated(unsafe), no Timer/RunLoop, and no continuation-wrapped
callbacks. The package already used parsing actors, async/await entry
points, and AsyncStream producers, so the public API is observably
identical for callers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Record the Approachable Concurrency adoption in the change log. No public
API signatures changed; the bump is MINOR because the upcoming-feature
flags modernize the package's async execution semantics module-wide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@RISCfuture RISCfuture merged commit 29f3b6c into main Jun 27, 2026
6 checks passed
@RISCfuture RISCfuture deleted the modern-concurrency branch June 27, 2026 18:30
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.

1 participant