[TIMOB-24072] iOS: Classic projects always invoke xcodebuild; Differential builds
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-11-04T02:51:43.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.0.0 |
Components | iOS |
Labels | qe-6.0.0 |
Reporter | Eric Wieber |
Assignee | Chris Barber |
Created | 2016-10-25T18:42:20.000+0000 |
Updated | 2016-11-09T22:18:30.000+0000 |
Description
When building a Classic project, I always see
[INFO] Invoking xcodebuild
during the build, even when performing a subsequent build with no changes. The reason appears to be:
[INFO] Forcing rebuild: image was updated, recompiling asset catalog
I also see that many files that should be skipped are getting copied/overwritten:
[TRACE] No change, skipping /Users/Eric/Documents/Appcelerator_Studio_Workspace/diffClassic/build/iphone/Assets.xcassets/f58b0d04f3ad524648680e9940fb4e77323cb9bb.imageset/tab1.png
[DEBUG] Overwriting /Users/Eric/Documents/Appcelerator_Studio_Workspace/diffClassic/Resources/assets/images/tab1.png => /Users/Eric/Documents/Appcelerator_Studio_Workspace/diffClassic/build/iphone/Assets.xcassets/f58b0d04f3ad524648680e9940fb4e77323cb9bb.imageset/tab1.png
*Steps to reproduce issue*
1. Create a new Classic project
2. Build that project for iOS sim
3. Build the project again for the same iOS sim
*Expected Results*
Xcodebuild is skipped as there are no changes to the project
*Actual Results*
Xcodebuild is invoked on each build
*Notes*
I am attaching my full build log
Attachments
File | Date | Size |
---|---|---|
diffbuild log.txt | 2016-10-25T18:41:45.000+0000 | 280163 |
Is there a difference when you toggle
[~cng], for the most part, yes. I changed app-thinning to false, saved, and built the app multiple times. The first two builds were the same and invoked xcodebuild (I would expect this with the first build after changing the tiapp, but not the second), however every build after that has skipped xcodebuild correctly. Cleaning and rebuilding caused xcodebuild to be invoked at the correct times. I still see "skipped" files being copied and overwritten, though.
When using the app-thinning, we generate the asset-catalog / Contents.json on [every build](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L5445). So couldn't we just compare the existing asset catalog with the one what wants to be written and skip the writing if they already match?
tisdk master PR: https://github.com/appcelerator/titanium_mobile/pull/8581 tisdk 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8582
CR AND FT PASSED. PRs merged.
Verified fixed, using: MacOS 10.12 (16A323) Studio 4.8.0.201611020954 Ti SDK 6.0.0.v20161109075403 Appc NPM 4.2.8-9 Appc CLI 6.0.0-69 Alloy 1.9.4 Xcode 8.1 (8B62) Skipped files are no longer overwritten and xodebuild can be correctly skipped. Tested by creating a new Classic app, building it for iOS sim, then building it several more times for the same iOS sim, with no changes to the project.