Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24072] iOS: Classic projects always invoke xcodebuild; Differential builds

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-11-04T02:51:43.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.0.0
ComponentsiOS
Labelsqe-6.0.0
ReporterEric Wieber
AssigneeChris Barber
Created2016-10-25T18:42:20.000+0000
Updated2016-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

FileDateSize
diffbuild log.txt2016-10-25T18:41:45.000+0000280163

Comments

  1. Chee Kiat Ng 2016-10-26

    Is there a difference when you toggle in tiapp.xml? [~ewieber]
  2. Eric Wieber 2016-10-26

    [~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.
  3. Hans Knöchel 2016-10-29

    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?
  4. Chris Barber 2016-11-03

    tisdk master PR: https://github.com/appcelerator/titanium_mobile/pull/8581 tisdk 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8582
  5. Chee Kiat Ng 2016-11-04

    CR AND FT PASSED. PRs merged.
  6. Eric Wieber 2016-11-09

    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.

JSON Source