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

Add description for SPM API version 4 #2341

Merged
merged 2 commits into from Oct 30, 2017

Conversation

Projects
None yet
2 participants
@hayashikun
Contributor

hayashikun commented Oct 27, 2017

Goals ⚽️

Enable to build project including Alamofire by using Swift Package Manager API Version 4

Implementation Details 🚧

Recently, Swift Package Manager API Version is updated.
So, I added how to write Package.swift in APIv4 format.

https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV3.md
https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md

@jshier

This comment has been minimized.

Show comment
Hide comment
@jshier

jshier Oct 30, 2017

Contributor

Thanks for the PR! I think it would be less confusing to just mark the two sections as Swift 3.1 and Swift 3.2+ or perhaps Xcode 8 and Xcode 9. Once that change is made it can be merged.

Contributor

jshier commented Oct 30, 2017

Thanks for the PR! I think it would be less confusing to just mark the two sections as Swift 3.1 and Swift 3.2+ or perhaps Xcode 8 and Xcode 9. Once that change is made it can be merged.

@hayashikun

This comment has been minimized.

Show comment
Hide comment
@hayashikun

hayashikun Oct 30, 2017

Contributor

Actually, API version is not compatible with Swift version or Xcode version.
So, marking Swift tools version 3, 4 is correct, I think.

The default tools version is same with swift major version.
So there is a option to mark Swift 3 and Swift 4.

Which is the best?

Contributor

hayashikun commented Oct 30, 2017

Actually, API version is not compatible with Swift version or Xcode version.
So, marking Swift tools version 3, 4 is correct, I think.

The default tools version is same with swift major version.
So there is a option to mark Swift 3 and Swift 4.

Which is the best?

@jshier

This comment has been minimized.

Show comment
Hide comment
@jshier

jshier Oct 30, 2017

Contributor

Version 3 shipped with the Swift 3 compiler and version 4 with the Swift 4 compiler, no? That should match exactly to Xcode versions, so that's probably the simplest way to indicate the distinction.

Contributor

jshier commented Oct 30, 2017

Version 3 shipped with the Swift 3 compiler and version 4 with the Swift 4 compiler, no? That should match exactly to Xcode versions, so that's probably the simplest way to indicate the distinction.

@hayashikun

This comment has been minimized.

Show comment
Hide comment
@hayashikun

hayashikun Oct 30, 2017

Contributor

https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV3.md#swiftlanguageversions

We can use APIv3 from Swift 4, but it is rare case. So I marked Swift 3 and Swift 4

Contributor

hayashikun commented Oct 30, 2017

https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV3.md#swiftlanguageversions

We can use APIv3 from Swift 4, but it is rare case. So I marked Swift 3 and Swift 4

@jshier

This comment has been minimized.

Show comment
Hide comment
@jshier

jshier Oct 30, 2017

Contributor

How would you invoke the v3 behavior in the Swift 4 compiler? By having a Package.swift with a swiftLanguageVersions of [3]?

Contributor

jshier commented Oct 30, 2017

How would you invoke the v3 behavior in the Swift 4 compiler? By having a Package.swift with a swiftLanguageVersions of [3]?

@hayashikun

This comment has been minimized.

Show comment
Hide comment
@hayashikun

hayashikun Oct 30, 2017

Contributor

In swift 4 compiler, default tool verion is 4 just after swift package init.
I can change swift tool version 3 by typing swift package tools-version --set 3.0.0

Contributor

hayashikun commented Oct 30, 2017

In swift 4 compiler, default tool verion is 4 just after swift package init.
I can change swift tool version 3 by typing swift package tools-version --set 3.0.0

@hayashikun

This comment has been minimized.

Show comment
Hide comment
@hayashikun

hayashikun Oct 30, 2017

Contributor

or
Top line of Package.swift default is // swift-tools-version:4.0.
By changing this to // swift-tools-version:3.0, swift package tool version is switched.

Contributor

hayashikun commented Oct 30, 2017

or
Top line of Package.swift default is // swift-tools-version:4.0.
By changing this to // swift-tools-version:3.0, swift package tool version is switched.

@jshier

This comment has been minimized.

Show comment
Hide comment
@jshier

jshier Oct 30, 2017

Contributor

Thanks! Cheers! 🍻

Contributor

jshier commented Oct 30, 2017

Thanks! Cheers! 🍻

@jshier jshier merged commit 3618824 into Alamofire:master Oct 30, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jshier jshier added this to the 4.6.0 milestone Dec 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment