Closed Jeehut closed 4 years ago
@Jeehut I agree with you – for projects that use Xcode 12, using SPM instead of Accio will be the better option (although the build caching features of Accio are something that will be missed).
I suggest to add this information to the README as soon as the Xcode 12 (Swift 5.3) Beta gets released.
@fredpi there is ongoing work on llbuild2 that will add caching features to SPM as well
SwiftPM only works when the dependency is actually a SwiftPM package; it requires upstream to have a Package.swift
manifest. If I understand Accio correctly, it works with any repository with .xcodeproj
, similar to Carthage?
Background: I’m trying out Xcode beta 12 with Swift 5.3.
@FranklinYu Yes and no: Accio does actually require a Package.swift
file as the checkout part is done via SwiftPM. But because SwiftPM didn't support resources and binaries until now (but it will starting with Xcode 12), we used Carthage for building the projects. Thus Accio was mixing SwiftPM & Carthage.
The next step for Accio could be to actually change its implementation without changing the API to use SwiftPM for building as well. But I personally don't have the time to do that implementation and also I don't see the need for it given that SwiftPM is already built into Xcode. If anyone else wants to take over, implement more stuff and maintain Accio and also has some ideas on what missing gaps could be filled, please tell me here.
@PycKamil Do you have a direct to the ongonig work for adding caching? Your link only points to llbuild2 in general.
@Jeehut To make sure: did you mean that Accio requires dependencies to also provide their own Package.swift
manifests? I thought Accio is meant to be a drop-in replacement for all use-cases of Carthage. This statement:
It's mainly based on SwiftPM and also currently uses Carthages build command to ensure all Carthage compatible projects can be made compatible with it very easily (you just need to add a
Package.swift
file if it's not already there).
So this “Carthage compatible projects” are talking about framework authors, not framework consumers?
@FranklinYu
Did you mean that Accio requires dependencies to also provide their own Package.swift manifests?
Yes, that's what "Accio does actually require a Package.swift
file" means.
I thought Accio is meant to be a drop-in replacement for all use-cases of Carthage.
No, it's a separate dependency manager that utilizes Carthage & SwiftPM to fill some gaps and help the transition.
So this “Carthage compatible projects” are talking about framework authors, not framework consumers?
Not really, framework consumers can also make any project compatible with Accio by simply adding a valid Package.swift
file (there's examples in the README), it doesn't even have to include any source files as it is only required for checking out the right dependencies. But yes, if a framework supports Carthage, that doesn't necessarily mean it also supports Accio.
I used to consider adding support for Accio as the first step towards supporting SwiftPM. But with Xcode 12 and Swift 5.3 now projects should support SwiftPM directly as there's nothing holding them off anymore.
With the recent developments on Swift-Evolution, I feel like there will be no gap left to fill by Accio on the move to SwiftPM anymore starting with the release of Xcode 12 which will include Swift 5.3 where all of the changes are already implemented. Namely, these things will be added:
Therefore I would suggest that we add an info box at the top of the
README.md
file which points to those four proposals and mentions that we invite everyone to ask any dependencies they have included in their projects via Accio until now to open an issue for SwiftPM support starting with Swift 5.3 instead.We should also note that Accio will continue to work for everyone who can't move to Swift 5.3 immediately for the time being, but that we will only fix bugs for those and not add any more features as it's no longer needed.
I'm really happy all the changes have been done so fast in the end, I was afraid that they wouldn't all be added that quickly initially, but Swift is going into the right direction in general with these changes and with their focus on more platforms, the ecosystem & more flexibility with things like an improved concurrency model. I'm really looking forward to that bright future! Let's do our part.
Or do you guys see any ground that's not covered by SwiftPM yet which Accio could fill? CC: @fredpi @mrylmz