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

Swift 5.2 migration #2972

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Swift 5.2 migration #2972

wants to merge 9 commits into from

Conversation

olejnjak
Copy link
Contributor

@olejnjak olejnjak commented Apr 14, 2020

This PR demonstrates what changes would be necessary (or useful) to migrate Carthage to use Swift 5.2. TL;DR not much, just removing custom Result dependency would be fine. And for further development it would be very useful as in Swift 5 custom Result can be easily mistaken with the built-in type.

Is there any reason that Carthage still uses old Swift version and old Xcode? Requiring ancient ReactiveSwift just makes development of tools, that would like to use CarthageKit, difficult.

@elliottwilliams
Copy link
Contributor

In order for a Homebrew formula to support an OS, it has to be able to build on it. In other words, even if you keep the deployment target at macOS 10.13, upgrading to Swift 5 would mean that Carthage's brew formula has to drop support for 10.13, because it can no longer build on a version of Xcode that runs on 10.13.

The last Xcode that runs on macOS 10.13 is Xcode 10.1, which uses Swift 4.2.1, so that's where things are stuck, unfortunately :(

@jdhealy mentioned last fall that it might be worth dropping High Sierra support once Catalina gets some adoption. Perhaps now's a good time to look into that?

With Homebrew's criteria necessitating us to build with Swift 4.2.X in order to bottle binary releases for High Sierra — and High Sierra being just one behind the latest macOS release — I'm not comfortable dropping support for High Sierra until we see some significant numbers from Catalina.

@thedavidharris
Copy link

The deadline for submitting this with the iOS 13 SDK is June 30th (see https://developer.apple.com/news/?id=03262020b), so I think that would make supporting Xcode 10.x unnecessary? That would be a better barometer to shift things.

@jdhealy
Copy link
Member

jdhealy commented Apr 21, 2020

I imagine for people migrating (as it’s a process) untouched-for-periods-of-time apps that don‘t ’just compile‘ under Xcode 11.X — having Carthage available on the still-using-older-tools portion of that path would be important.

That said, there’s probably a middle ground to be had… in a number of ways. ✨ One great contribution — if someone were willing to explore it — would be examining a solid way for High-Sierra–based Homebrew-consuming Carthage users to be informed via Homebrew formula methods of ways to install Carthage (maybe older Carthage versions) outside the Homebrew ways.

@thedavidharris
Copy link

@jdhealy Agreed, but given Carthage uploads binaries as part of releases I think it would be fair to expect them to manually install a working version and have the info appropriately available.

https://github.com/Homebrew/homebrew-core/blob/master/Formula/carthage.rb just calls prefix_install so you could put some OS check in there and direct a STDOUT link to the last compatible version, if that's acceptable. Would need a roadmap/timing for when the last High Sierra supported release is though to merge it at the appropriate time.

@eliperkins
Copy link
Contributor

@olejnjak
Copy link
Contributor Author

Yep, I already removed my fork of Tentacle and will update this PR 🙂

@jdhealy
Copy link
Member

jdhealy commented Apr 23, 2020

@eliperkins @olejnjak Appreciate that, great stuff! ☀️🚀

(For those following along sporadically — that Tentacle release is not really the thing we're waiting for to move this Carthage migration across the finish line; other factors at play).

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

Successfully merging this pull request may close these issues.

None yet

5 participants