Carthage update creates differences in Build folder for unchanged libraries

Created on 12 Jun 2015  路  6Comments  路  Source: Carthage/Carthage

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>
build

Most helpful comment

I think this happens because carthage checkout touches the timestamps of files. That indeed is something Carthage could handle better, isn't it?

All 6 comments

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

https://gist.github.com/evgenyneu/547e2b65f86e375cbefc

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JustinJiaDev picture JustinJiaDev  路  3Comments

justinmakaila picture justinmakaila  路  4Comments

CAPIStkidd picture CAPIStkidd  路  3Comments

yonaskolb picture yonaskolb  路  3Comments

3lvis picture 3lvis  路  3Comments