{ "id": "161902", "key": "TIMOB-23668", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2016-07-21T08:24:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-08-09T15:57:02.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "10207", "name": "Tooling" } ], "description": "It looks like differential build is not working when hyperloop is used.\r\n\r\nh4. Steps to reproduce\r\n1. Create a simple app with hyperloop enabled\r\n2. appc run -p ios\r\n3. change app.js\r\n4. appc run -p ios\r\n\r\nh4. Expected Result\r\ntrace will show \"Skipping Xcodebuild\"\r\n\r\nh4. Actual Result\r\ntrace shows \"invoking xcodebuild\" \" Forcing rebuild: Xcode project has changed since last build\"", "attachment": [], "flagged": false, "summary": "iOS: Hyperloop - Differential build not working", "creator": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Xcode 7.3.1\r\nHyperloop 1.2.3\r\nAppc CLI 5.4.0-31\r\nAppc NPM 4.2.7\r\n", "comment": { "comments": [ { "id": "391760", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "What's happening here is that before Hyperloop kicks in, there is a step during the build that triggers the creation of a new Xcode project (Not sure yet where exactly this happens). Hyperloop then changes the project and adds the required files. On subsequent builds this happens over and over again and Hyperloop always starts altering a fresh Xcode project, thus forcing a rebuild.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-28T01:10:22.000+0000", "updated": "2016-07-28T01:10:22.000+0000" }, { "id": "391767", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber] any advice on this?\r\n[~jvennemann] I thought Hyperloop has a check to see if new metabase needs to be generated. If it determines that metabase generation can be skipped, can't we assume that we can skip hyperloop changing the Xcode project and adding required files?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-28T02:52:29.000+0000", "updated": "2016-07-28T02:52:29.000+0000" }, { "id": "391905", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "If Hyperloop is going to modify the generated Xcode project, it should do it during the {{build.ios.xcodeproject}} hook.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-07-28T22:17:01.000+0000", "updated": "2016-07-28T22:17:01.000+0000" }, { "id": "392187", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "Just for the record, here is a summary about my findings regarding this issue. Hyperloop only uses the {{build.ios.xcodeproject}} hook to store the Xcode project data. The actual changes to the project are made during the {{build.pre.build}} hook. So the normal Titanium iOS builder has no idea of the changes Hyperloop made and overwrites the Xcode project without any Hyperloop generated files included on the next build.\r\n\r\nI thought about changing the order when Hyperloop generates its metabase but it relies on the {{build.ios.copyResource}} hook to detect if any relevant files were required and only then triggers a metabase generation. And this hook happens after {{build.ios.xcodeproject}} so it would require some (major?) refactoring to the whole hyperloop metabase workflow. If at all viable (how do we get the js files before the copyResource hook?).\r\n\r\nAlso our current strategy to decide if we need to invoke a build with xcode is quite trivial. Xcode project file changed? Rebuild! Assuming we can fix the differential build issue, another one would arise. If we use custom Swift or Objective-C code and would change something there, neither the sdk or hyperloop would trigger a rebuild simply because the file is already in the xcode project. => file monitor or something like that is needed.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-02T10:12:57.000+0000", "updated": "2016-08-02T10:12:57.000+0000" }, { "id": "392190", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "So what changed? This used to work, albeit not great. Because Allow does not support differential builds, the iOS build was always recompiling, but I personally made the Hyperloop CLI plugin support differential builds.\r\n\r\nYou may need to do your file operations during the {{build.ios.xcodeproject}} hook, which is not ideal. I don't want more file I/O that we need. If we're VERY careful, we could write the Xcode project later in the build, possibly after the resources have been copied, but we must call xcodebuild \"clean\" because we use schemes now and we don't nuke the derived data like we used to.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-08-02T13:02:12.000+0000", "updated": "2016-08-02T13:02:12.000+0000" }, { "id": "412072", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jvennemann] status on this? Didn't see this bug for a long time and it's scheduled for 6.1.0.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-14T14:46:26.000+0000", "updated": "2017-03-14T14:46:26.000+0000" }, { "id": "412074", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is still happening. The CLI writes the Xcode project, then Hyperloop adds stuff which CLI isn't aware of. On the next build the CLI will replace the Xcode project again without any Hyperloop related changes, forcing constant rebuilds. I can spend time on this as soon as i got the Android AAR stuff sorted out.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-14T15:11:27.000+0000", "updated": "2017-03-14T15:11:27.000+0000" }, { "id": "412075", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Hyperloop should be making changes to the Xcode project during the {{build.ios.xcodeproject}} hook.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-14T15:21:53.000+0000", "updated": "2017-03-14T15:21:53.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }