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
[NTV-606] KingFisher Carthage -> SPM #1722
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1722 +/- ##
=======================================
Coverage 85.33% 85.33%
=======================================
Files 1275 1275
Lines 114806 114806
Branches 30343 30343
=======================================
Hits 97970 97970
Misses 15784 15784
Partials 1052 1052 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
690a289
to
6d3d245
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most changes look good, one thing I noticed, (on the AlamofireImage
PR too), is to not include the framework in the main Kickstarter-iOS
target if it can be avoided.
In this case the previous Carthage
version of Kingfisher
was included only in Library-iOS
, and because Library-iOS
is imported in Kickstarter-iOS
, it should be enough to just include Kingfisher
in only Library-iOS
.
A good way to check is to look at exactly which targets the library is included in before removing from Carthage
and add it back in those same targets (always under Build Phases
Link Binary with Libraries
) after SPM caches it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to go!
📲 What
As we migrate over to M1 machines for local development, we'll want to move over our Carthage dependencies into Xcode dependency manager where we can.
🤔 Why
There are many benefits of using SPM over Carthage, but the main reason is to avoid handling manual compilation scripts to support multiple architecture types like this one found inside
carthage.sh
As you can see it's verbose, very cryptic, and we're not entirely sure if we can add M1 support to strings like
EXCLUDED_ARCHS
At least for now, we're going to move all dependencies that we can over to SPM that are listed inside the
Cartfile
.For now we'll do the 3rd party dependencies. There's also binaries which aren't built as schemas (the step failing on
make bootstrap
with M1 because of the code snippet above). Finally there's internal libraries that do get converted to schemas, which we might need to create custom SPM packages out of as we did withKickstarter-Prelude
.🛠 How
KingFisher
fromCartfile
.KingFisher
fromCartfile.resolved
Kickstarter/Frameworks
folder and within each target.Carthage-xcfilelist
https://github.com/onevcat/Kingfisher
to Package Dependencies version 7.3.2Library
targetimport KingFisher
, set breakpoints for where framework references are, run app and hit breakpoints. Continue running app and smoke tests where framework call sites occur.✅ Acceptance criteria
import KingFisher
and run the app on device to check the breakpoints are hit and the app continues to run as expected.