Skip to content

App: fix build error caused by SwiftPM version difference - #21

Open
clkbng wants to merge 1 commit into
WireGuard:masterfrom
clkbng:fix-swiftpm-build-error
Open

clkbng wants to merge 1 commit into
WireGuard:masterfrom
clkbng:fix-swiftpm-build-error

Conversation

@clkbng

@clkbng clkbng commented Mar 10, 2023

Copy link
Copy Markdown

My App's Network Extension causes the following error, depends on public remote SwiftPM package.

Invalid manifest

/(path_to)/TemporaryFile.hzdchM.swift:9:17: error: 'v12' is unavailable
.macOS(.v12),
^~~
PackageDescription.SupportedPlatform:18:27: note: 'v12' was introduced in PackageDescription 5.5
public static let v12: PackageDescription.SupportedPlatform.MacOSVersion
^
/(path_to)/TemporaryFile.hzdchM.swift:10:15: error: 'v15' is unavailable
.iOS(.v15)
^~~
PackageDescription.SupportedPlatform:65:27: note: 'v15' was introduced in PackageDescription 5.5
public static let v15: PackageDescription.SupportedPlatform.IOSVersion
^ in https://git.zx2c4.com/wireguard-apple

As error message says, MacOSVersion.v121 and IOSVersion.v152 are available in PackageDescription 5.5 and above, but Package.swift still specifies SwiftPM version 5.3.
So, we must bump the swift-tools-version as well.

Footnotes

  1. https://developer.apple.com/documentation/packagedescription/supportedplatform/macosversion/v12

  2. https://developer.apple.com/documentation/packagedescription/supportedplatform/iosversion/v15

'MacOSVersion.v12' and 'IOSVersion.v15' are available in PackageDescription 5.5 and above.
ConaruVPN pushed a commit to ConaruVPN/wireguard-apple that referenced this pull request Sep 15, 2026
Package.swift declares swift-tools-version:5.3 but uses .macOS(.v12) and
.iOS(.v15), which require PackageDescription 5.5. Xcode's SwiftPM manifest
loader rejects this as an invalid manifest under recent toolchains, so
package resolution fails before any consuming project can build.

Upstream (WireGuard/wireguard-apple) has carried this defect unfixed since
Feb 2023; several community PRs (WireGuard#21, WireGuard#24, WireGuard#57, WireGuard#58) propose the same
one-line fix with none merged. This applies the same fix on our own fork so
Conaru's build is not blocked by it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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