[AC-1213] Constant Rebuilding for minor .js file changes

GitHub Issuen/a
Resolution Date2014-04-23T02:59:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
ReporterJosh Lewis
AssigneeRitu Agrawal


I don’t know if its an XCode thing, or a Titanium SDK thing, but one thing I noticed that is busted is that before, if you were loading a new window via the url message, you could go “back” (or close the window), make some changes, and then reopen it and those changes would take affect. Now, you have to run the build EVERY TIME.


  1. Ritu Agrawal 2014-03-24 Thanks for reporting this issue? Do you mean to say that a full build is performed every time and there is no incremental build anymore? or you did not have to build at all for some minor changes earlier?
  2. Josh Lewis 2014-03-24 If I open a new .js file (say by clicking on a button). Before, I could go back to the original window, make changes in the new one, and then click the button again to open the new window with those changes (not including things that require a build, like new files). Now, the above doesnt work, and the entire project has to be re-built for minor changes.
  3. Josh Lewis 2014-04-16 Any update?
  4. Caleb Cox 2014-04-20 The change you are mentioning was introduced in git commit [36db944663391636e413646ca47fe06f0591eeed](https://github.com/appcelerator/titanium_mobile/commit/36db944663391636e413646ca47fe06f0591eeed). After this change, JavaScript resources are always copied when building for the iOS simulator instead of symlinked. To revert back to the previous behavior (symlink simulator resources), change the line:
    fs.writeFile(to, r.contents, cb);
    in ~/Library/Application Support/Titanium/mobilesdk/osx//iphone/cli/commands/build.js to:
    copyFile.call(this, from, to, cb);
    (for me it is line 2891). This worked for me; hope it helps!
  5. Josh Lewis 2014-04-21 That worked for me, thanks! Any reason why it's not the default?
  6. Caleb Cox 2014-04-21 No, I do not know. I cannot tell whether that change was intentional or an accidental. Hopefully, they will fix it soon!
  7. Chris Barber 2014-04-21 [~calebcox314] and [~joshlewis], iOS Simulator and Android emulator builds should be pretty quick. If you only changed JS files, then the rebuild is usually a couple seconds. If you're doing a device build, then the JavaScript is encrypted and the app must be recompiled. Since the description in this ticket does not indicate device or simulator, I have to assume you're talking about device builds. Part of the problem is that build targets (simulator, device, dist) control deploy type which in turn controls a bunch of stuff like encryption and code minification. I'm working to decouple this by introducing build configurations. Build configurations will allow you to have total control over a bunch of settings. Unfortunately, it looks like build configurations in its entirety won't be making it into the upcoming Titanium SDK 3.3.0. :( As far as the JS files no longer being symlinked, that's a bug. I doubt this is causing a serious performance issue, but still, every bit helps. I've created a new ticket TIMOB-16871 to fix the symlinking. As for this ticket, this is not something that we plan to fix until build configurations are fully implemented which includes not only the build scripts, but also Titanium Studio.
  8. Ritu Agrawal 2014-04-23 Resolving this ticket as a duplicate of TIMOB-16871 as comments in this ticket indicate a simulator build. Please track that ticket for further updates. There is another ticket for build configurations.

JSON Source