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

Use updated dependencies when building with Swift 5, but keep backwards-compatibility with Swift 4 #2999

Conversation

elliottwilliams
Copy link
Contributor

This is a complement to #2972, but doesn't make any breaking changes to CI / homebrew. It starts the work of upgrading to Swift 5.2 by using updated dependencies when Carthage is built with a 5.x compiler. These changes are helpful for users who depend on Carthage as a SwiftPM package [1], and should make it a little easier to drop support for Swift 4.x in the future.

[1]: Carthage doesn't build with Commandant >= 0.17.0, because that version drops support for antitypical/Result. You can manually pin Commandant to an older version, but then you can't depend on tools that have upgraded to the newer version of Commandant, like SwiftLint. So this PR helps keep users out of dependency hell when they're using SwiftPM to version their build tools.

#if compiler(>=5)
compilerSpecificDependencies = [
.package(url: "https://github.com/antitypical/Result.git", from: "5.0.0"),
.package(url: "https://github.com/Carthage/ReactiveTask.git", .branch("release-0.17.0")),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

release-0.17.0 is the branch of Carthage/ReactiveTask#120, which has been open for a year :)

AFAICT, nothing is preventing that PR from being merged, there just hasn't been a reason to yet. It needs to get merged before this PR, since versioned packages can't have branch dependencies.

@elliottwilliams elliottwilliams force-pushed the swift_5_conditional_compilation branch from 275cdcd to 0e0b1ee Compare June 14, 2020 19:21
@stale
Copy link

stale bot commented Aug 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 1, 2020
@stale stale bot closed this Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant