Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update swiftLanguageVersions to swift-tools-version:4.2 #2736

Merged
merged 1 commit into from Mar 6, 2019

Conversation

Projects
None yet
2 participants
@mattt
Copy link
Contributor

mattt commented Mar 6, 2019

This PR fixes incompatibilities with Swift 5 compiler due to an API change in the Package.swift manifest API.

swiftLanguageVersions changed from taking [Int] to [SwiftVersion] in PackageDescription API Version 4.2. For more information, see https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4_2.md#swift-language-version.

I've tested this with Swift 4.2.1 (swiftlang-1000.11.42) and Swift 5 (swiftlang-1001.0.63.8), and it appears to work for both. It was difficult to verify because of build errors related to #2698, but I was able to work around that by passing an explicit macOS 10.12 target with the -Xswiftc flag:

$ swift build -Xswiftc -target -Xswiftc x86_64-apple-macosx10.12
Compile Swift Module 'Alamofire' (30 sources)
Update swiftLanguageVersions to swift-tools-version:4.2
This API changed from taking [Int] to [SwiftVersion] in PackageDescription API Version 4.2. For more information, see https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4_2.md#swift-language-version.
@jshier

This comment has been minimized.

Copy link
Contributor

jshier commented Mar 6, 2019

Thanks Mattt!

Once Xcode 10.2 ships we'll update to the v5 syntax and fix #2698.

@jshier jshier merged commit fe8c032 into Alamofire:master Mar 6, 2019

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@mattt

This comment has been minimized.

Copy link
Contributor Author

mattt commented Mar 6, 2019

@jshier Thanks for the quick merge!

Please see #2737 if you're interested in a solution that isn't blocked by Xcode 10.2 GM.

@jshier jshier added this to the 5.0.0-beta.3 milestone Mar 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.