Repository navigation
Mark the Network TLS version conversion as available from macOS 10.15 - #17
Merged
Merged
Conversation
tls_protocol_version_t is only available in macOS 10.15, iOS 13, tvOS 13 and watchOS 6. The package declares no minimum platforms, so the unannotated TLSVersion.init?(_:) failed to compile for deployment targets below those. Its only call site is already guarded by the same availability check. Co-Authored-By: Claude Sonnet 5.5 <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.
Problem
TLSVersion.init?(_ version: tls_protocol_version_t)inHTTPConnectionSetupRecorder.swifthas no@available, buttls_protocol_version_tis only available in macOS 10.15, iOS 13, tvOS 13 and watchOS 6. The package declares no minimum platforms, so any consumer with a lower deployment target fails to compile 1.39.0:Catalyst and visionOS are unaffected because their minimums are already higher.
Fix
Annotate the initializer with
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *). Its only call site (HTTPConnectionPool.Factory.recordTLSInfo) is already inside an equivalent#availablecheck.Verification
swiftc -typecheck -target x86_64-apple-macosx10.13; it fails without the annotation and passes with it.swift buildpasses.A 1.39.1 tag from
releaseis needed afterwards for consumers to pick this up.🤖 Generated with Claude Code