[TIMOB-12094] CLI : iOS: When invalid code is used in an app.js the pre-compilation phase will fail on iOS device builds
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-12-20T16:21:48.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.1, Release 3.1.0, 2012 Sprint 26 JS, 2012 Sprint 26 |
Components | CLI |
Labels | qe-ios100112, qe-port, qe-testadded, regression |
Reporter | Michael Pettiford |
Assignee | Chris Barber |
Created | 2012-12-14T00:15:01.000+0000 |
Updated | 2017-03-31T22:03:58.000+0000 |
Description
*Note* The previous behavior is for device builds the app would successfully build, but crash when run on device.
Steps to reproduce:
1. Create a default Titanium mobile project in studio
2. Add the following snippet of code to app.js
var win = Ti.UI.createWindow();
win.crash(arg){};
3. Build the app for iOS device
Actual result:
The pre-compilation phase will fail (As per Chris Barber's investigation)
but XCode will continue on and install on device. Then an error message will be displayed saying app.js can't be found
Expected result:
A compilation error should be generated in the uglify step
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3598 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3599
ALso noticing this with Alloy compilation. When Alloy pre-compile fails, the build execution is not halted.
For those experiencing the issue, please download the following build of the SDK: * OSX: http://nightlies.s3.amazonaws.com/mobile/mobilesdk-3.0.1.v20121218130634-osx.zip * Linux: http://nightlies.s3.amazonaws.com/mobile/mobilesdk-3.0.1.v20121218130634-linux.zip * Windows: http://nightlies.s3.amazonaws.com/mobile/mobilesdk-3.0.1.v20121218130634-win32.zip You may install these manually into your SDK folder, or using Studio's *Help > Install Titanium SDK...* menu option
OSX 10.8.2 Ti Studio build: 3.0.1.201212181159 Ti Mobile SDK build: 3.0.2.v20130121140213 Ti Mobile SDK build: 3.1.0.v20130114171802 CLI build version 3.0.23
Closing as fixed. A compilation Error: [TRACE] : Command /bin/sh failed with exit code 1 [ERROR] : ** BUILD FAILED ** [ERROR] : The following build commands failed: [ERROR] : PhaseScriptExecution Pre-Compile build/test.build/Debug-iphoneos/test-universal.build/Script-DABB369F12E8CB280026A6EA.sh [ERROR] : (1 failure)
Tested Environment: Appcelerator Studio: 3.2.0.201312191455 SDK:3.2.0.v20131218153242 alloy: 1.3.0-cr2 acs: 1.0.11 npm: 1.3.2 titanium: 3.2.0-cr3 titanium-code-processor: 1.1.0-cr2 Xcode:5.0.2 OS: Mac OSX 10.9 When the above code snippet is added the not getting any precompilation error. But the Simulator gets launched and after that error appears CLI as
Syntax checking ONLY happens when performing device and distribution builds. If you are building for simulator/emulator, you won't see any JS errors until the app is launched. I've filed TIMOB-16058 to add support for syntax error checking.
Closing ticket as fixed, if there are any problems, please file a new ticket.