[AC-2683] Parsing Bug in Building for iOS Distribution
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-14T23:28:39.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Studio, Titanium SDK & CLI |
Labels | distribution, ios, javascript |
Reporter | Joe Falcone |
Assignee | Mauro Parra-Miranda |
Created | 2012-09-30T04:50:43.000+0000 |
Updated | 2016-03-08T07:41:47.000+0000 |
Description
This was a real head scratcher.
Posted on Q&A as
http://developer.appcelerator.com/question/142848/distribution-build-for-ios6-failing-with-213-sdks-including-rc--rc2
This happens ONLY when you build for "Distribute - Apple iTunes Store"
The same code runs on iPhone emulator, Android emulator, and build for Distribution on Android.
When you build for Distribution for Apple - you get this error on console:
[INFO] Performing clean build
[INFO] Compiling localization files
[DEBUG] compiled ios file: /Users/jrf/Workspace/iPumpkin/build/iphone/build/Release-iphoneos/iPumpkin.app/en.lproj/Localizable.strings
[ERROR]
[ERROR] Error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120927181611/iphone/builder.py", line 1551, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120927181611/iphone/builder.py", line 1231, in execute_xcode
output = run.run(args,False,False,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120927181611/iphone/run.py", line 41, in run
sys.exit(rc)
SystemExit: 65
This was in an App with over 20,000 lines of JS so once we had determined that this error was specific to this App, we removed files from the App until we found the one that caused the error. Then we removed suspect statements until we found the one. And you won't believe, but it is true.
a = b
/ c;
That's it. a = b on one line, and / c; on the second line.
The actual statement was more complex, but the gist is that the parser accepts
a = b
as a valid statement and the croaks on
/ c;
as a malformed comment or statement.
This arose because the formatter had split the statement on to separate lines with the division operator at the beginning of the second line.
BTW,
a = ( b
/ c );
also doesn't work.
Tested with 3.0.2 GA and can't reproduce. This works:
Since this report is old now, I assume it was fixed.