Hi, when I run 'carthage update' it always creates differences in the Build folder for the libraries that have not changed. We do commit the Build folder, and seeing all those differences make pull request differences a bit hard to read.
For example, here is the list of changed files for Bond framework after doing carthage update. Note that this framework has not changed.
modified: Carthage/Build/iOS/Bond.framework/Bond
modified: Carthage/Build/Mac/Bond.framework/Versions/A/Bond
modified: Carthage/Build/Mac/Bond.framework/Versions/A/Modules/Bond.swiftmodule/x86_64.swiftmodule
modified: Carthage/Build/iOS/Bond.framework/Modules/Bond.swiftmodule/arm.swiftmodule
modified: Carthage/Build/iOS/Bond.framework/Modules/Bond.swiftmodule/arm64.swiftmodule
modified: Carthage/Build/iOS/Bond.framework/Modules/Bond.swiftmodule/i386.swiftmodule
modified: Carthage/Build/iOS/Bond.framework/Modules/Bond.swiftmodule/x86_64.swiftmodule
modified: Carthage/Build/iOS/Bond.framework/_CodeSignature/CodeResources
Here is a portion of git diff after carthage update. You can see the data element value changes from _mlz5hgTB9/djakgi6ntpYKWRmuo=_ to _jhGlTzuPsgy+XcMaxrkto0p9PNo=_.
--- a/Carthage/Build/iOS/Bond.framework/_CodeSignature/CodeResources
+++ b/Carthage/Build/iOS/Bond.framework/_CodeSignature/CodeResources
@@ -22,7 +22,7 @@
</data>
<key>Modules/Bond.swiftmodule/arm.swiftmodule</key>
<data>
- mlz5hgTB9/djakgi6ntpYKWRmuo=
+ jhGlTzuPsgy+XcMaxrkto0p9PNo=
</data>
<key>Modules/Bond.swiftmodule/arm64.swiftdoc</key>
<data>
I don't think this is really Carthage's responsibility. It's Xcode that's deciding to rebuild things even though the source hasn't changed, and Carthage doesn't have a reliable way to tell whether it should or should not run xcodebuild.
I would favor a solution like https://github.com/Carthage/Carthage/issues/218 instead.
Here is a script that I run after carthage update to undo changes to build frameworks except the given ones:
./undo_ios_carthage_except.sh kif quick
I think this happens because carthage checkout touches the timestamps of files. That indeed is something Carthage could handle better, isn't it?
Awesome Script!!! :clap:
However I don't normally manage /Carthage/Build with git. :cry:
Is this problem solved? I am still getting the behaviour of everything being rebuilt superslowly...
@hariseldon78 What you want should be tracked in #1489 and #1222.
Most helpful comment
I think this happens because
carthage checkouttouches the timestamps of files. That indeed is something Carthage could handle better, isn't it?