v2.1.0: Swift 6 strict concurrency#20
Merged
Merged
Conversation
Bumps the package to swift-tools-version 6.0 and enables Swift 6
language mode (strict concurrency checking) on all targets via
swiftLanguageMode(.v6) in swiftSettings.
The library compiles clean under both default Swift 6 mode and the
maximally-strict `-strict-concurrency=complete -warnings-as-errors`
flag combination — no source changes required. The v2.0 rewrite was
already concurrency-correct by design:
* All public value types declared Sendable explicitly
* Mutable state lives behind actors (MulticastListener, TaskBox)
* Cross-actor communication uses `Task { ... }` indirection
* No mutable globals — os.Logger instances are Sendable, SSDPLog is
an enum-namespace
* Network.framework types (NWConnectionGroup, NWConnection, NWParameters)
are Sendable in iOS 17+ SDKs (our floor)
* `@Sendable` annotations on the closures handed to onTermination
Turning on enforcement validates the design.
Verification
------------
* swift build -Xswiftc -strict-concurrency=complete -Xswiftc -warnings-as-errors
— clean
* swift test — 32/32 pass
* Live LAN: ssdp-demo search ssdp:all --timeout 3 — 93 results
including Sonos ZPS45, no regressions
* swift build --package-path Examples/ssdp-demo — clean
Requirements
------------
Now requires Swift 6.0+ / Xcode 16+. Library platforms unchanged
(iOS 17, macOS 14, tvOS 17). README's "Requirements" section updated.
The Swift badge bumped from 5.9 to 6.
Version constant bumped to 2.1.0 (minor — strict concurrency is a
build-time check, not a public API change; existing call sites still
compile unchanged).
Co-Authored-By: Claude Opus 4.7 <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.
Bumps the package to
swift-tools-version:6.0and enables Swift 6 language mode (strict concurrency checking) on all targets viaswiftLanguageMode(.v6).What changed
The library compiles clean under both default Swift 6 mode and the maximally-strict
-strict-concurrency=complete -warnings-as-errorscombination — no source changes required. The v2.0 rewrite was already concurrency-correct by design; this PR just turns on enforcement.Why no source fixes were needed
The v2 rewrite was deliberately built strict-concurrency-aware even while skipping the language-mode bump:
SendableexplicitlyMulticastListener,TaskBox)Task { ... }indirectionos.Loggerinstances areSendable,SSDPLogis an enum-namespaceNetwork.frameworktypes areSendablein iOS 17+ SDKs (our floor)@Sendableannotations on closures handed toonTerminationTurning on enforcement validates the design.
Verification
swift build -Xswiftc -strict-concurrency=complete -Xswiftc -warnings-as-errorsswift testssdp-demo search ssdp:all --timeout 3swift build --package-path Examples/ssdp-demoRequirements bump
Now requires Swift 6.0+ / Xcode 16+. Library platforms unchanged. Version constant bumped to 2.1.0 (minor — strict concurrency is a build-time check, not a public API change; existing call sites still compile unchanged).
🤖 Generated with Claude Code