Repository navigation
Conversation
The Swift 6.5 nightly compiler warns when a versioned `#if canImport(Module, _version:)` names a module it cannot find (CanImportMissingModule). CI builds with -warnings-as-errors, so the four CryptoKit version checks in CryptoWrappers.swift failed the Linux nightly-main jobs, where CryptoKit does not exist. Follow the documented remedy: check that the module can be imported at all before checking its version. The directive still evaluates to false on Linux, so the SwiftCrypto fallback path is unchanged, and older compilers accept the combined condition.
finagolfin
added a commit
to finagolfin/swift-network-evolution
that referenced
this pull request
Oct 7, 2026
deadcaf3
marked this pull request as ready for review
October 7, 2026 06:59
deadcaf3
requested review from
agnosticdev,
ekinnear and
tfpauly
as code owners
October 7, 2026 06:59
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.
The nightly-main compiler warns on
#if canImport(CryptoKit, _version:)where CryptoKit does not exist (CanImportMissingModule), and-warnings-as-errorsmakes that fatal on Linux. Introduced by #197.canImport(CryptoKit) &&, the remedy from the compiler's diagnostic docs.swiftlang/swift:nightly-main-jammy:ci-linux.shand the static SDK build pass with the fix and fail without it.